Skip to content

Commit

Permalink
fix #172
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler committed May 24, 2024
1 parent 8fa73e3 commit f61a804
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/cordova.js
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,8 @@ if (window["__os__"] != undefined) {
var term = "/cordova.js";
for (var n = scripts.length - 1; n > -1; n--) {
var src = scripts[n].src.replace(/\?.*$/, ""); // Strip any query param (CB-6007).
if (src.lastIndexOf(term) === src.length - term.length) {
let index = src.lastIndexOf(term);
if (index !== -1 && index === src.length - term.length) {
path = src.substring(0, src.length - term.length) + "/";
break;
}
Expand Down

0 comments on commit f61a804

Please sign in to comment.