mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
chore: polyfill Array.at for old browsers
This commit is contained in:
parent
9f348b70d6
commit
c758e19e90
3 changed files with 11 additions and 2 deletions
|
|
@ -7966,7 +7966,7 @@
|
||||||
<script src="utils/graphUtils.js?v=1.93.12"></script>
|
<script src="utils/graphUtils.js?v=1.93.12"></script>
|
||||||
<script src="utils/nodeUtils.js"></script>
|
<script src="utils/nodeUtils.js"></script>
|
||||||
<script src="utils/numberUtils.js?v=1.89.08"></script>
|
<script src="utils/numberUtils.js?v=1.89.08"></script>
|
||||||
<script src="utils/polyfills.js?v=1.93.00"></script>
|
<script src="utils/polyfills.js?v=1.95.03"></script>
|
||||||
<script src="utils/probabilityUtils.js?v=1.88.00"></script>
|
<script src="utils/probabilityUtils.js?v=1.88.00"></script>
|
||||||
<script src="utils/stringUtils.js"></script>
|
<script src="utils/stringUtils.js"></script>
|
||||||
<script src="utils/languageUtils.js"></script>
|
<script src="utils/languageUtils.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,15 @@ if (Array.prototype.flat === undefined) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// at
|
||||||
|
if (Array.prototype.at === undefined) {
|
||||||
|
Array.prototype.at = function (index) {
|
||||||
|
if (index < 0) index += this.length;
|
||||||
|
if (index < 0 || index >= this.length) return undefined;
|
||||||
|
return this[index];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// readable stream iterator: https://bugs.chromium.org/p/chromium/issues/detail?id=929585#c10
|
// readable stream iterator: https://bugs.chromium.org/p/chromium/issues/detail?id=929585#c10
|
||||||
if (ReadableStream.prototype[Symbol.asyncIterator] === undefined) {
|
if (ReadableStream.prototype[Symbol.asyncIterator] === undefined) {
|
||||||
ReadableStream.prototype[Symbol.asyncIterator] = async function* () {
|
ReadableStream.prototype[Symbol.asyncIterator] = async function* () {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// version and caching control
|
// version and caching control
|
||||||
const version = "1.95.02"; // generator version, update each time
|
const version = "1.95.03"; // generator version, update each time
|
||||||
|
|
||||||
{
|
{
|
||||||
document.title += " v" + version;
|
document.title += " v" + version;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue