diff options
Diffstat (limited to 'install/ui/src/freeipa')
-rw-r--r-- | install/ui/src/freeipa/_base/Builder.js | 5 | ||||
-rw-r--r-- | install/ui/src/freeipa/_base/construct.js | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/install/ui/src/freeipa/_base/Builder.js b/install/ui/src/freeipa/_base/Builder.js index 063261f37..0eb76c4a7 100644 --- a/install/ui/src/freeipa/_base/Builder.js +++ b/install/ui/src/freeipa/_base/Builder.js @@ -149,7 +149,7 @@ define(['dojo/_base/declare', pre = spec.$pre_ops, post = spec.$post_ops; - var s = lang.clone(spec); + var s = lang.mixin({},spec); delete s.$ctor; delete s.$factory; delete s.$mixim_spec; @@ -214,6 +214,9 @@ define(['dojo/_base/declare', var cs = construction_spec, obj = null; + // here we should clone cs.spec to prevent modification of original + // by pre_ops + cs.spec = this._run_preops(this.pre_ops, cs.spec, context); if (cs.pre_ops) { cs.spec = this._run_preops(cs.pre_ops, cs.spec, context); diff --git a/install/ui/src/freeipa/_base/construct.js b/install/ui/src/freeipa/_base/construct.js index 19829bd84..bc017ad66 100644 --- a/install/ui/src/freeipa/_base/construct.js +++ b/install/ui/src/freeipa/_base/construct.js @@ -45,8 +45,8 @@ define(['dojo/_base/declare', * It makes sure that pre_ops, post_ops and spec are new Arrays/Object */ copy_cs: function(org_cs) { - var cs = lang.clone(org_cs); - if (cs.spec) cs.spec = lang.clone(cs.spec); + var cs = lang.mixin({}, org_cs); + if (cs.spec) cs.spec = lang.mixin({}, cs.spec); cs.pre_ops = cs.pre_ops.slice(0); cs.post_ops = cs.pre_ops.slice(0); return cs; |