From c1b55c1fa8d27136653736d58d6f118f49dd1da8 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Fri, 11 Jan 2019 13:53:41 -0800 Subject: [PATCH] added try/catch block --- modules/parseXml.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/parseXml.js b/modules/parseXml.js index 7da186e..af399c1 100644 --- a/modules/parseXml.js +++ b/modules/parseXml.js @@ -1,10 +1,5 @@ -Object.defineProperty(Array.prototype, "peek", -{ - value: function () - { - return (this.length > 0 ? this[this.length - 1] : undefined); - } -}); +try { Object.defineProperty(Array.prototype, "peek", { value: function () { return (this.length > 0 ? this[this.length - 1] : undefined); } }); } catch (e) { } + function _treeBuilder()