From 460f93ca8d27429153bbdf45235cf190fe371bdd Mon Sep 17 00:00:00 2001 From: walterhiggins Date: Sat, 26 Jan 2013 09:57:43 +0000 Subject: [PATCH] warn if putSign() is called with block id other than 63 or 68 issue #39 --- src/main/javascript/core/_primitives.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/javascript/core/_primitives.js b/src/main/javascript/core/_primitives.js index 8ae055a..93207aa 100644 --- a/src/main/javascript/core/_primitives.js +++ b/src/main/javascript/core/_primitives.js @@ -52,6 +52,8 @@ var global = this; }; var _putSign = function(texts, x, y, z, blockId, meta){ + if (blockId != 63 && blockId != 68) + throw new Error("Invalid Parameter: blockId must be 63 or 68"); putBlock(x,y,z,blockId,meta); var block = _getBlockObject(x,y,z); state = block.state;