node.jsreactjstizensamsung-smart-tv

Uncaught TypeError: Object.values is not a function


Okay so, I npm run build my application, drag the build files into tizon studio.
Run the application... I get the error:

2.bd938b3f.chunk.js:79798 Uncaught TypeError: Object.values is not a function

The same behavior is shown on any Samsung and Tizon model I've tested this on.

I've tried switching out Object.values with Object.map, which returns "the same" error.

2.bd938b3f.chunk.js:79798 Uncaught TypeError: Object.map is not a function

I have not been able to find an answer to fix this.
Any help with finding an answer would be massively appreciated.
Thank you all in advance!

if (!le) {
    (function () {
        for (var e = window.document.getElementsByTagName("script"), t = 0, n = Object.values(e); t < n.length; t++) {
            var r = n[t];
            if (r.src && r.src.includes(te))
                return r
        }
        return null
    })() || function (e) {
        var t = document.createElement("script");
        t.src = te + "?l=" + e,
            t.async = !0,
            document.head.appendChild(t)
    }
            (ue),
        function (e) {
            var t = [];
            Array.isArray(window[e]) ? t = window[e] : window[e] = t
        }
            (ue);
    var r = ne(se, ue, ce),
        i = r.wrappedGtag,
        a = r.gtagCore;
    ie = i,
        re = a,
        le = !0
}

Solution

  • Samsung's TizenOS's javascript isn't as up-to-date as it could be, and according to this looks to not be actively supported.

    You can use react-app-polyfill to provide any missing functionalities.

    We use the following in our root index.jsx as the "kitchen sink" of polyfills

    import 'react-app-polyfill/ie9';
    import 'react-app-polyfill/stable';