Famous / engine

MIT License
1.75k stars 250 forks source link

Uncaught TypeError: Cannot read property 'split' of null (fixed in devel) #441

Closed gadicc closed 9 years ago

gadicc commented 9 years ago

Adding this just for reference :> I've been experiencing this in some situations since 0.6, including 0.7, and haven't had a chance to track it down. Delighted to say that from the Jul 20/21 commits on develop, this has been solved. In case anyone else has been experiencing this.

Compositor.js:136:

Compositor.prototype.handleWith = function handleWith (iterator, commands) {
    var path = commands[iterator];
    var pathArr = path.split('/');  // <--- here
    var context = this.getOrSetContext(pathArr.shift());
    return context.receive(path, commands, iterator);
};
alexanderGugel commented 9 years ago

This issue still persists when using the Mesh in some cases. The causes are incorrectly formatted commands (most of the time WITH is missing).

gadicc commented 9 years ago

Ah ok, got it, it's what you're tracking in #436 ("Mesh#onDismount is broken") and as per comment 2 also affects Mesh#onOpacityChange, Mesh#onSizeChange, Mesh#onTransformChange, Mesh#onHide, Mesh#onShow. Thanks!