Skip to content

Commit c6c371b

Browse files
authored
Merge pull request rpgtkoolmv#179 from rev2nym/rpgtkoolmv#176-update-parsing-query-string-1.6.1
rpgtkoolmv#176 fix Utils.isOptionValid()
2 parents 76fdfef + 6a9c781 commit c6c371b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

js/rpg_core/Utils.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,16 @@ Utils.RPGMAKER_ENGINE = "community-1.2c";
3939
* @return {Boolean} True if the option is in the query string
4040
*/
4141
Utils.isOptionValid = function(name) {
42-
return location.search.slice(1).split('&').contains(name);
42+
if (location.search.slice(1).split('&').contains(name)) {
43+
return true;
44+
}
45+
if (typeof nw !== "undefined" &&
46+
nw.App.argv.length > 0 &&
47+
nw.App.argv[0].split('&').contains(name)
48+
) {
49+
return true;
50+
}
51+
return false;
4352
};
4453

4554
/**

0 commit comments

Comments
 (0)