Fix for old browsers (min version)

This commit is contained in:
Oleg Korshul
2025-11-28 11:39:45 +03:00
parent 7b5cc28ee6
commit 31277701ae

14
vendor/array.js vendored
View File

@ -205,8 +205,17 @@
if (window &&
window.AscCommon &&
window.AscCommon.AscBrowser &&
window.AscCommon.AscBrowser.isChrome &&
typeof Object.values === "undefined")
window.AscCommon.AscBrowser.isChrome)
{
let typeOfValues = typeof Object.values;
let isOld = typeOfValues === "undefined";
if (!isOld && typeOfValues === "function")
{
if (Object.values.toString().indexOf("[native code]") === -1)
isOld = true;
}
if (isOld)
{
(function() {
var _sort = Array.prototype.sort;
@ -251,4 +260,5 @@
};
})();
}
}
})();