diff --git a/source/Ox/js/Constants.js b/source/Ox/js/Constants.js index 11df711c..10ed071e 100644 --- a/source/Ox/js/Constants.js +++ b/source/Ox/js/Constants.js @@ -91,8 +91,8 @@ Ox.SHORT_MONTHS = Ox.MONTHS.map(function(val) { Ox.PATH = (function() { // IE8 can't apply slice to NodeLists, see Ox.slice var index, scripts = document.getElementsByTagName('script'); - for (index = scripts.length; index >= 0; index--) { - var src = element.src; + for (index = scripts.length - 1; index >= 0; index--) { + var src = scripts[index].src; if (/Ox\.js(\?\d+|)$/.test(src)) { return src.replace(/Ox\.js(\?\d+|)$/, ''); }