From 6a9c781ba66b759613d7650f0b78143372a3dd9f Mon Sep 17 00:00:00 2001 From: rev2nym Date: Wed, 22 Aug 2018 23:14:37 +0900 Subject: [PATCH] #176 fix Utils.isOptionValid() Import from official corescript ver1.6.1 and fix make it return bool. And add line breaks. --- js/rpg_core/Utils.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/js/rpg_core/Utils.js b/js/rpg_core/Utils.js index 9c6c5562..ccfda839 100644 --- a/js/rpg_core/Utils.js +++ b/js/rpg_core/Utils.js @@ -39,7 +39,16 @@ Utils.RPGMAKER_ENGINE = "community-1.2c"; * @return {Boolean} True if the option is in the query string */ Utils.isOptionValid = function(name) { - return location.search.slice(1).split('&').contains(name); + if (location.search.slice(1).split('&').contains(name)) { + return true; + } + if (typeof nw !== "undefined" && + nw.App.argv.length > 0 && + nw.App.argv[0].split('&').contains(name) + ) { + return true; + } + return false; }; /**