From c22b451a7876ffc54e62a7600740d45ffb4e45ca Mon Sep 17 00:00:00 2001 From: Ulysses Popple Date: Sun, 12 Oct 2014 15:32:48 -0400 Subject: [PATCH] Remove the controller from __controllers According to js specs, the `slice` method doesn't change the original array. Therefore, we have to reassign `__controllers` to `this.__controllers` after slicing. --- src/dat/gui/GUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dat/gui/GUI.js b/src/dat/gui/GUI.js index 0077f7d..e2b058a 100644 --- a/src/dat/gui/GUI.js +++ b/src/dat/gui/GUI.js @@ -544,7 +544,7 @@ define([ // TODO listening? this.__ul.removeChild(controller.__li); - this.__controllers.slice(this.__controllers.indexOf(controller), 1); + this.__controllers = this.__controllers.slice(this.__controllers.indexOf(controller), 1); var _this = this; common.defer(function() { _this.onResize();