mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-01 10:56:42 +02:00
Replace forEach() with for()
This commit is contained in:
@@ -121,9 +121,12 @@ export function createButton<T=HTMLButtonElement>(options: BxButton): T {
|
||||
}
|
||||
|
||||
const style = (options.style || 0) as number;
|
||||
style && ButtonStyleIndices.forEach((index: keyof typeof ButtonStyleClass) => {
|
||||
if (style) {
|
||||
let index: keyof typeof ButtonStyleClass;
|
||||
for (index of ButtonStyleIndices) {
|
||||
(style & index) && $btn.classList.add(ButtonStyleClass[index] as string);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
options.classes && $btn.classList.add(...options.classes);
|
||||
|
||||
|
Reference in New Issue
Block a user