bug 3198: replace (toString.call by {}.toString.call to make it work with IE (all versions)

git-svn-id: http://piwigo.org/svn/branches/2.7@30942 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2015-02-10 13:52:47 +00:00
parent 48354d14aa
commit 11f530c514
@@ -851,7 +851,7 @@
}).call(_this);
current_path = document.location.href;
if (_this._isRedirect(path, current_path)) {
if (toString.call(path) === "[object RegExp]") {
if ({}.toString.call(path) === "[object RegExp]") {
_this._redirect(step, path);
}
else {
@@ -1002,7 +1002,7 @@
};
Tour.prototype._isRedirect = function(path, currentPath) {
return (path != null) && path !== "" && ((toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || (toString.call(path) === "[object String]" && path !== currentPath.replace("http://", "").replace("https://", "")));
return (path != null) && path !== "" && (({}.toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || ({}.toString.call(path) === "[object String]" && path !== currentPath.replace("http://", "").replace("https://", "")));
};
Tour.prototype._redirect = function(step, path) {