Permalink
Browse files

use Y.mojito.util.copy() instead of Y.clone()

  • Loading branch information...
1 parent 2c35b63 commit 3cfff95e209c436a7acb68de5eb541c08538b231 @drewfish drewfish committed Aug 15, 2012
Showing with 8 additions and 8 deletions.
  1. +3 −3 source/lib/app/addons/rs/config.server.js
  2. +5 −5 source/lib/app/addons/rs/yui.server.js
@@ -58,7 +58,7 @@ YUI.add('addon-rs-config', function(Y, NAME) {
* @return {object} the YCB dimensions structure for the app
*/
getDimensions: function() {
- return Y.clone(this._ycbDims, true);
+ return Y.mojito.util.copy(this._ycbDims);
},
@@ -85,7 +85,7 @@ YUI.add('addon-rs-config', function(Y, NAME) {
}
this._jsonCache[fullPath] = json;
}
- return Y.clone(json, true);
+ return Y.mojito.util.copy(json);
},
@@ -220,4 +220,4 @@ YUI.add('addon-rs-config', function(Y, NAME) {
Y.namespace('mojito.addons.rs');
Y.mojito.addons.rs.config = RSAddonConfig;
-}, '0.0.1', { requires: ['plugin', 'oop', 'json-parse']});
+}, '0.0.1', { requires: ['plugin', 'oop', 'json-parse', 'mojito-util']});
@@ -298,7 +298,7 @@ YUI.add('addon-rs-yui', function(Y, NAME) {
dest.views[res.name]['binder-module'] = res.yui.name;
sorted = this._getYUIDependencies('client', poslKey, ctx.lang, res.yui.name);
if (sorted && sorted.paths) {
- dest.views[res.name]['binder-yui-sorted'] = Y.clone(sorted.paths, true);
+ dest.views[res.name]['binder-yui-sorted'] = Y.mojito.util.copy(sorted.paths);
}
}
if (res.type === 'controller') {
@@ -308,7 +308,7 @@ YUI.add('addon-rs-yui', function(Y, NAME) {
dest.yui.sorted = sorted.sorted.slice();
}
if (this.usePrecomputed && sorted && sorted.paths) {
- dest.yui.sortedPaths = Y.clone(sorted.paths, true);
+ dest.yui.sortedPaths = Y.mojito.util.copy(sorted.paths);
}
}
}
@@ -386,7 +386,7 @@ YUI.add('addon-rs-yui', function(Y, NAME) {
if (!this.modules[env][poslKey]) {
this.modules[env][poslKey] = {};
}
- this.modules[env][poslKey][mojit] = Y.clone(modules, true);
+ this.modules[env][poslKey][mojit] = Y.mojito.util.copy(modules);
// we always want to do calculations for no-lang
if (!langs['']) {
@@ -398,7 +398,7 @@ YUI.add('addon-rs-yui', function(Y, NAME) {
lang = langs[langName];
if (controller) {
- required = Y.clone(controllerRequired, true);
+ required = Y.mojito.util.copy(controllerRequired);
required['mojito-dispatcher'] = true;
required[controller.yui.name] = true;
if (lang && lang.yui) {
@@ -638,4 +638,4 @@ YUI.add('addon-rs-yui', function(Y, NAME) {
Y.namespace('mojito.addons.rs');
Y.mojito.addons.rs.yui = RSAddonYUI;
-}, '0.0.1', { requires: ['plugin', 'oop', 'loader-base', 'json-stringify']});
+}, '0.0.1', { requires: ['plugin', 'oop', 'loader-base', 'json-stringify', 'mojito-util']});

0 comments on commit 3cfff95

Please sign in to comment.