Skip to content

Commit 509074b

Browse files
committed
Initial support for saving tests
1 parent 27b8b88 commit 509074b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dev/src/net/Server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ export default class Server {
116116
if (!o.id) { delete(o.id); }
117117
if (!o.parentId) { delete(o.parentId); }
118118
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);
120121
return o;
121122
}
122123

dev/src/views/Text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default class Text extends EventDispatcher {
5454
}
5555

5656
set tests(val) {
57-
val = val || [];
57+
val = val instanceof Array ? val : [];
5858
this._tests = this.testList.data = val;
5959
this._testMatches = this._selTest = null;
6060
if (val.length) { this.testList.selected = val[0].id; }

0 commit comments

Comments
 (0)