From eb68274d2c1c99effd1c24f1ccfc304e659c415e Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 10 Jun 2014 15:47:19 -0400 Subject: [PATCH] refactor(dom) remove --- lib/client/dom.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/client/dom.js b/lib/client/dom.js index e639c37c..285cf612 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -1372,8 +1372,12 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; * @param pChild * @param element */ - this.remove = function(pChild, element) { - return (element || document.body).removeChild(pChild); + this.remove = function(child, element) { + var parent = element || document.body; + + parent.removeChild(child); + + return DOM; }; /**