# HG changeset patch # User Drew Perttula # Date 1465449316 0 # Node ID 73762e14ee98ae9bad36208d4fd06326877a8e9e # Parent b4d81ecf055c2d2acbbf13b9eaed1849c70064f2 typecheck on applyPatch Ignore-this: 74f1fbbbc338b377b466aac6e477f27b diff -r b4d81ecf055c -r 73762e14ee98 light9/web/graph.coffee --- a/light9/web/graph.coffee Thu Jun 09 05:13:32 2016 +0000 +++ b/light9/web/graph.coffee Thu Jun 09 05:15:16 2016 +0000 @@ -162,6 +162,8 @@ [q.subject, q.predicate, q.object, q.graph] for q in @graph.find() applyAndSendPatch: (patch) -> + if !Array.isArray(patch.addQuads) || !Array.isArray(patch.delQuads) + throw new Error("corrupt patch: #{patch}") @_applyPatch(patch) @_client.sendPatch(patch) if @_client