mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
Number.isInteger polyfill for IE11
This commit is contained in:
parent
2cbf2c3a79
commit
9d7e128be9
@ -1,4 +1,4 @@
|
|||||||
if (typeof Object.assign != 'function') {
|
if (typeof Object.assign !== 'function') {
|
||||||
// Must be writable: true, enumerable: false, configurable: true
|
// Must be writable: true, enumerable: false, configurable: true
|
||||||
Object.defineProperty(Object, "assign", {
|
Object.defineProperty(Object, "assign", {
|
||||||
value: function assign(target, varArgs) { // .length of function is 2
|
value: function assign(target, varArgs) { // .length of function is 2
|
||||||
@ -27,3 +27,9 @@ if (typeof Object.assign != 'function') {
|
|||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Number.isInteger = Number.isInteger || function(value) {
|
||||||
|
return typeof value === 'number' &&
|
||||||
|
isFinite(value) &&
|
||||||
|
Math.floor(value) === value;
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user