Fix Cast lazy loading

Move all the heavy initialization, which takes ~300ms, from require('./lib/cast') to Cast.init()
This commit is contained in:
DC
2016-07-08 10:45:15 -07:00
parent 50c47dd657
commit dfe1e3b631
2 changed files with 8 additions and 4 deletions

View File

@@ -249,7 +249,7 @@ function dispatch (action, ...args) {
}
var handler = dispatchHandlers[action]
if (handler) handler.apply(null, args)
if (handler) handler(...args)
else console.error('Missing dispatch handler: ' + action)
// Update the virtual-dom, unless it's just a mouse move event