Skip to content

Commit 7a0f623

Browse files
committed
- Fixed bug: licenseKey was showing an error on IE 11
1 parent 6ef392a commit 7a0f623

File tree

6 files changed

+50
-5
lines changed

6 files changed

+50
-5
lines changed

dist/fullpage.extensions.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fullpage.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,31 @@
215215
});
216216
}
217217

218+
// https://stackoverflow.com/questions/51719553/padstart-not-working-in-ie11
219+
// https://github.com/behnammodi/polyfill/blob/master/string.polyfill.js
220+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart
221+
if (!String.prototype.padStart) {
222+
String.prototype.padStart = function padStart(targetLength, padString) {
223+
targetLength = targetLength >> 0; //truncate if number or convert non-number to 0;
224+
225+
padString = String(typeof padString !== 'undefined' ? padString : ' ');
226+
227+
if (this.length > targetLength) {
228+
return String(this);
229+
} else {
230+
targetLength = targetLength - this.length;
231+
232+
if (targetLength > padString.length) {
233+
padString += Array.apply(null, Array(targetLength)).map(function () {
234+
return padString;
235+
}).join("");
236+
}
237+
238+
return padString.slice(0, targetLength) + String(this);
239+
}
240+
};
241+
}
242+
218243
//utils
219244
/**
220245
* Shows a message in the console of the given type.
@@ -5344,7 +5369,7 @@
53445369
});
53455370
});
53465371
var t = ["-"];
5347-
var n = "2022-8-7".split("-"),
5372+
var n = "2022-8-8".split("-"),
53485373
e = new Date(n[0], n[1], n[2]),
53495374
i = ["se", "licen", "-", "v3", "l", "gp"];
53505375

dist/fullpage.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/mixed/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/polyfills/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './array.find.js';
22
import './array.from.js';
33
import './array.foreach.js';
4-
import './object.assign.js';
4+
import './object.assign.js';
5+
import './string.padStart.js';
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// https://stackoverflow.com/questions/51719553/padstart-not-working-in-ie11
2+
// https://github.com/behnammodi/polyfill/blob/master/string.polyfill.js
3+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart
4+
if (!String.prototype.padStart) {
5+
String.prototype.padStart = function padStart(targetLength,padString) {
6+
targetLength = targetLength>>0; //truncate if number or convert non-number to 0;
7+
padString = String((typeof padString !== 'undefined' ? padString : ' '));
8+
if (this.length > targetLength) {
9+
return String(this);
10+
}
11+
else {
12+
targetLength = targetLength-this.length;
13+
if (targetLength > padString.length) {
14+
padString += Array.apply(null, Array(targetLength)).map(function(){ return padString; }).join("");
15+
}
16+
return padString.slice(0,targetLength) + String(this);
17+
}
18+
};
19+
}

0 commit comments

Comments
 (0)