Skip to content

Commit 2d513dd

Browse files
committed
Rework baseFrame copy method and remove toJson method
1 parent 579b8dd commit 2d513dd

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/models/baseFrame.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,16 @@ class baseFrame {
5656
return moment();
5757
}
5858

59-
toJson() {
60-
return JSON.stringify({
61-
id: this.id,
62-
project: this.project,
63-
resource: this.resource,
64-
notes: this.notes,
65-
start: this._start,
66-
stop: this._stop,
67-
timezone: this.timezone
68-
});
69-
}
70-
7159
static copy(frame) {
72-
return baseFrame.fromJson(frame.config, JSON.parse(frame.toJson()));
60+
return baseFrame.fromJson(frame.config, {
61+
id: frame.id,
62+
project: frame.project,
63+
resource: frame.resource,
64+
notes: frame.notes,
65+
start: frame._start,
66+
stop: frame._stop,
67+
timezone: frame.timezone
68+
});
7369
}
7470

7571
get duration() {

0 commit comments

Comments
 (0)