Skip to content

Commit 381dfda

Browse files
committed
chore(js): remove Array.prototype.flat polyfill
Array.prototype.flat has been supported natively since Chrome 69, Firefox 62, Safari 12 (2018), and Edge 79. The polyfill was originally added for iOS < 12 support, which is no longer a target for Flarum 2.x. Removing it saves ~8.5 KiB from the bundled forum.js output.
1 parent 0b0924a commit 381dfda

6 files changed

Lines changed: 4 additions & 25 deletions

File tree

framework/core/js/dist/admin.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.

framework/core/js/dist/admin.js.map

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

framework/core/js/dist/forum.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.

framework/core/js/dist/forum.js.map

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

framework/core/js/src/common/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ import app from './app';
2525

2626
export { app };
2727

28-
import './utils/arrayFlatPolyfill';
29-
3028
const tooltipGen = $.fn.tooltip;
3129

3230
// Remove in a future version of Flarum.

framework/core/js/src/common/utils/arrayFlatPolyfill.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)