File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,8 @@ export default class Server {
116
116
if ( ! o . id ) { delete ( o . id ) ; }
117
117
if ( ! o . parentId ) { delete ( o . parentId ) ; }
118
118
delete ( o . userId ) ; // this gets added by the server
119
- o . tool = JSON . stringify ( o . tool ) ;
119
+ o . tool = o . tool && JSON . stringify ( o . tool ) ;
120
+ o . tests = o . tests && JSON . stringify ( o . tests ) ;
120
121
return o ;
121
122
}
122
123
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export default class Text extends EventDispatcher {
54
54
}
55
55
56
56
set tests ( val ) {
57
- val = val || [ ] ;
57
+ val = val instanceof Array ? val : [ ] ;
58
58
this . _tests = this . testList . data = val ;
59
59
this . _testMatches = this . _selTest = null ;
60
60
if ( val . length ) { this . testList . selected = val [ 0 ] . id ; }
You can’t perform that action at this time.
0 commit comments