diff options
Diffstat (limited to 'graffiti.js')
-rw-r--r-- | graffiti.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/graffiti.js b/graffiti.js index 7a9c168..1741452 100644 --- a/graffiti.js +++ b/graffiti.js @@ -202,6 +202,11 @@ export default class { throw new Error("_to must be an array") } + // Add an open context if none is declared + if (!object._inContextIf) { + object._inContextIf = [{}] + } + // Pre-generate the object's ID if it does not already exist if (!object._id) object._id = randomString() } |