Skip to content

Commit

Permalink
fix(core): unassign layer of deleted objects
Browse files Browse the repository at this point in the history
As soon as an object is deleted is doesn't belong to any layer,
so let's remove its layer attribute value.

Fixes one part of #727 (Uncaught TypeError: Cannot read property
'findCommonAncestor' of null).
  • Loading branch information
peppsac authored and zarov committed Apr 16, 2018
1 parent 97f1000 commit 19ae01c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Process/ObjectRemovalHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export default {
* @param {Object3D} obj object to release
*/
cleanup(obj) {
obj.layer = null;

if (typeof obj.dispose === 'function') {
obj.dispose();
} else {
Expand Down

0 comments on commit 19ae01c

Please sign in to comment.