on master help sign in
Add debugId in an immutable way
commit7d97daabfea5f42769e5a02a575832d3c1c3d34a authorEvan Czaplicki <info@elm-lang.org> dateMon 14 Apr 2014, 01:23 (13 years ago) parentcc213fb
1 file changed+3−2
libraries/Native/Debug.js+3−2
libraries/Native/Debug.js+3−2
@@ -7,6 +7,7 @@ Elm.Native.Debug.make = function(elm) {
77 return elm.Native.Debug.values = Elm.Native.Debug.values;
88
99 var show = Elm.Native.Show.make(elm).show;
10+ var replace = Elm.Native.Utils.make(elm).replace;
1011
1112 function log(tag, value) {
1213 var msg = tag + ': ' + show(value);
@@ -20,8 +21,8 @@ Elm.Native.Debug.make = function(elm) {
2021 }
2122
2223 function tracePath(debugId, elem) {
23− elem.props.debugTracePathId = debugId;
24− return elem;
24+ var props = replace([["debugTracePathId",debugId]], elem.props);
25+ return replace([["props",props]], elem);
2526 }
2627
2728 function WatchTracker() {