This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow mutating returned .toJSON value
Relaxes the constraints from #81 a little as it's caused quite a lot of tests to break. We still have an immutable copy in the object but any objects returned will be mutable.
- Loading branch information
1 parent
11d7f0a
commit d8239ad
Showing
3 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ class DAGLink { | |
}) | ||
} | ||
|
||
return this._json | ||
return Object.assign({}, this._json) | ||
} | ||
|
||
get name () { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ class DAGNode { | |
}) | ||
} | ||
|
||
return this._json | ||
return Object.assign({}, this._json) | ||
} | ||
|
||
toString () { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters