Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatmap not support on some old android device #85

Open
Zkffkah opened this issue Dec 9, 2021 · 0 comments
Open

flatmap not support on some old android device #85

Zkffkah opened this issue Dec 9, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Zkffkah
Copy link

Zkffkah commented Dec 9, 2021

flatmap not support on some old android device

Some polyfill here using Asset Manager

Array.prototype.flat || Object.defineProperty(Array.prototype, "flat", {
    configurable: !0,
    value: function r() {
        var t = isNaN(arguments[0]) ? 1 : Number(arguments[0]);
        return t ? Array.prototype.reduce.call(this, function(a, e) {
            return Array.isArray(e) ? a.push.apply(a, r.call(e, t - 1)) : a.push(e),
            a
        }, []) : Array.prototype.slice.call(this)
    },
    writable: !0
}),
Array.prototype.flatMap || Object.defineProperty(Array.prototype, "flatMap", {
    configurable: !0,
    value: function(r) {
        return Array.prototype.map.apply(this, arguments).flat()
    },
    writable: !0
})
@Zkffkah Zkffkah added the bug Something isn't working label Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants