File tree 2 files changed +26
-1
lines changed
2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ You are entering this break point because derivation '${derivation.name}' is bei
273
273
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
274
274
The stackframe you are looking for is at least ~6-8 stack-frames up.
275
275
276
- ${ derivation instanceof ComputedValue ? derivation . derivation . toString ( ) : "" }
276
+ ${ derivation instanceof ComputedValue ? derivation . derivation . toString ( ) . replace ( / [ * ] \/ / g , "/" ) : "" }
277
277
278
278
The dependencies for this derivation are:
279
279
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ test("trace", () => {
15
15
firstname : "Michel" ,
16
16
lastname : "Weststrate" ,
17
17
get fullname ( ) {
18
+ /* test multi line comment
19
+ (run this unit test from VS code, and pass 'true' as third argument to trace below to verify)
20
+ */
18
21
var res = this . firstname + " " + this . lastname
19
22
mobx . trace ( this , "fullname" )
20
23
return res
@@ -53,3 +56,25 @@ test("trace", () => {
53
56
console . log = baselog
54
57
}
55
58
} )
59
+
60
+ test ( "1850" , ( ) => {
61
+ const x = mobx . observable ( {
62
+ firstname : "Michel" ,
63
+ lastname : "Weststrate" ,
64
+ get fullname ( ) {
65
+ /* test multi line comment
66
+ (run this unit test from VS code, to manually verify serialization)
67
+ */
68
+ var res = this . firstname + " " + this . lastname
69
+ mobx . trace ( this , "fullname" , true )
70
+ return res
71
+ }
72
+ } )
73
+
74
+ mobx . autorun ( ( ) => {
75
+ x . fullname
76
+ } )
77
+ expect ( ( ) => {
78
+ x . firstname += "!"
79
+ } ) . not . toThrow ( "Unexpected identifier" )
80
+ } )
You can’t perform that action at this time.
0 commit comments