Skip to content

Commit

Permalink
need to clone deep in order to avoid objects and arrays being shared …
Browse files Browse the repository at this point in the history
…between clones
  • Loading branch information
pghalliday committed Jul 19, 2016
1 parent 5dcb4bf commit 48d3f38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsl-config",
"version": "1.0.4",
"version": "1.0.5",
"description": "Generate a DSL config with generators",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/DSLConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DSLConfig {
} else {
// Clone the supplied DSL config to ensure everything
// is initialised correctly
this.config = _.clone(dslConfig.config);
this.config = _.cloneDeep(dslConfig.config);
// bind the DSL methods to work with the correct
// config context
_.forOwn(dslConfig.dsl, (value, key) => {
Expand Down

0 comments on commit 48d3f38

Please sign in to comment.