Fix bug deleting specific object instances
This commit is contained in:
1 parent
1a83dcc1de
commit
f2d64d7676
1 file changed
+4
@@ -548,6 +548,7 @@ runDeclarations = (sessionContext, declarations) ->
|
|||||||
|
|
||||||
parent = common.addPathMeta(path.slice(0, -1))
|
parent = common.addPathMeta(path.slice(0, -1))
|
||||||
|
|
||||||
|
keys = null
|
||||||
if Array.isArray(path[path.length - 1])
|
if Array.isArray(path[path.length - 1])
|
||||||
keys = {}
|
keys = {}
|
||||||
for p, i in path[path.length - 1] by 2
|
for p, i in path[path.length - 1] by 2
|
||||||
@@ -1288,6 +1289,9 @@ processInstances = (sessionContext, parent, parameters, keys, minInstances, maxI
|
|||||||
else if counter <= minInstances
|
else if counter <= minInstances
|
||||||
instancesToDelete.delete(p)
|
instancesToDelete.delete(p)
|
||||||
|
|
||||||
|
# Key is null if deleting a particular instance rather than use alias
|
||||||
|
return if not keys
|
||||||
|
|
||||||
superset = instancesToCreate.superset(keys)
|
superset = instancesToCreate.superset(keys)
|
||||||
for inst in superset
|
for inst in superset
|
||||||
++ counter
|
++ counter
|
||||||
|
|||||||
Reference in new issue
Block a user