Comparing version 0.0.1 to 0.0.2
@@ -7,2 +7,3 @@ var EventPipeline = { | ||
} | ||
for events in | ||
}, | ||
@@ -13,2 +14,4 @@ | ||
// Every update, check to see if there are new nodes in | ||
module.exports = EventPipeline |
@@ -28,3 +28,2 @@ var StateMap = require("./state-map.js") | ||
RenderLoop.prototype.update = function() { | ||
console.log("updating") | ||
var self = this | ||
@@ -36,3 +35,2 @@ // If you are getting this error, it oftentimes meant | ||
if (!this.redrawScheduled) { | ||
console.log("scheduling redraw") | ||
this.redrawScheduled = true | ||
@@ -44,3 +42,2 @@ raf(function scheduledRedraw() { self.redraw.call(self) }) | ||
RenderLoop.prototype.redraw = function() { | ||
console.log("in redraw") | ||
this.redrawScheduled = false | ||
@@ -50,3 +47,10 @@ this.isRendering = true | ||
// We expect to get a virtual tree back (such as what's generated by virtual-dom/virtual-hyperscript) | ||
var newTree = this.renderFn(this.state) | ||
try { | ||
var newTree = this.renderFn(this.state) | ||
} | ||
catch (e) { | ||
console.error("Error with render function during redraw: ", e.stack) | ||
this.isRendering = false | ||
return false | ||
} | ||
var patches = diff(this.currentTree, newTree) | ||
@@ -53,0 +57,0 @@ this.currentRender = patch(this.currentRender, patches) |
{ | ||
"name": "hafnium", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A minimal framework on top of virtual-dom", | ||
@@ -15,3 +15,11 @@ "main": "index.js", | ||
"author": "Dylan McDiarmid <dylan@littleloops.io>", | ||
"license": "MIT" | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/littleloops/hafnium" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/littleloops/hafnium/issues" | ||
}, | ||
"homepage": "https://github.com/littleloops/hafnium" | ||
} |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6488
9
120
1
2
0