From ffa5e65835d4e6b54f82c68628f5df1a2b75877d Mon Sep 17 00:00:00 2001 From: cha0s Date: Fri, 19 Jun 2020 15:28:16 -0500 Subject: [PATCH] feat: inline fromJSON --- packages/behavior/item/traversal.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/behavior/item/traversal.js b/packages/behavior/item/traversal.js index 590e993..1ecf714 100644 --- a/packages/behavior/item/traversal.js +++ b/packages/behavior/item/traversal.js @@ -2,9 +2,12 @@ import {fromJSON as behaviorItemFromJSON} from './registry'; export class Traversal { - constructor() { + constructor(json) { this.steps = []; this.value = undefined; + if (json) { + this.fromJSON(json); + } } clone(other) {