Skip to content

Commit 65b7000

Browse files
author
Gusted
committed
Let's make it less broken changes
1 parent 148c04e commit 65b7000

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/index.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ export type ModelEntry = [string, string, 0 | 1, ModelEntryScreen[]];
8989

9090
const debug = false ? console.log : undefined;
9191

92+
if (!String.prototype.includes) {
93+
String.prototype.includes = function(search, start) {
94+
return this.indexOf(search, start) !== -1;
95+
}
96+
}
97+
9298
export const getGPUTier = async ({
9399
mobileTiers = [0, 15, 30, 60],
94100
desktopTiers = [0, 15, 30, 60],
@@ -307,9 +313,9 @@ export const getGPUTier = async ({
307313
const tiers = isMobile ? mobileTiers : desktopTiers;
308314
let tier = 0;
309315

310-
for (const [index, tierFPS] of tiers.entries()) {
311-
if (fps >= tierFPS) {
312-
tier = index;
316+
for (let i = 0; i < tiers.length; i++) {
317+
if (fps >= tiers[i]) {
318+
tier = i;
313319
}
314320
}
315321

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"declarationDir": "dist/types",
1515
"outDir": "dist/lib",
1616
"typeRoots": ["node_modules/@types"],
17-
"downlevelIteration": true,
1817
},
1918
"include": ["src/**/*.ts"],
2019
"exclude": ["node_modules"]

0 commit comments

Comments
 (0)