catch bad NAT command implementations at runtime
This commit is contained in:
@@ -136,9 +136,16 @@
|
||||
(if (hasComponent e Connections)
|
||||
(withWritableComponents archive e [conn Connections]
|
||||
(doFor e2 entriesToConnect (dictSet conn e2.id 1)))
|
||||
(addComponent archive e Connections (for e2 entriesToConnect =>e2.id 1))))
|
||||
(addComponent archive e Connections (for e2 entriesToConnect =>e2.id 1)))
|
||||
)
|
||||
|
||||
(function removeConnections [:nat.Archive archive :nat.Entry e :Array<Entry> entriesToRemove]
|
||||
(when (hasComponent e Connections)
|
||||
(withWritableComponents archive e [conn Connections]
|
||||
(doFor e2 entriesToRemove (conn.remove e2.id)))))
|
||||
(doFor e2 entriesToRemove (conn.remove e2.id))))
|
||||
e)
|
||||
|
||||
(function isEntry [o]
|
||||
(let [fields (Reflect.fields o)]
|
||||
(and (= fields.length 3)
|
||||
(apply and (for f ["id" "components" "files"] (contains fields f))))))
|
||||
Reference in New Issue
Block a user