'Uncaught TypeError: g is not a function - Browser Direct Print Issue

In library provided by the vendor (Zebra Printer) for direct browser print. The label test works fine, but when I try to print an image this error pops-up.

"Uncaught TypeError: g is not a function at line 279"

Following is the code snippet



 e.convert = function(a, c, d, g, f) {
        if (a)
            if ("string" === typeof a) e.loadFileFromUrl(a, function(b) {
                d.fromFormat ||
                (d.fromFormat = a.substring(a.length - 3));
                e.convert(b, c, d, g, f)
            }, f);
            else {
                var k = b("POST", l + "convert");
                a.type && (a.type.startsWith("image/") || a.type.startsWith("application/")) && (d.fromFormat = a.type.toLowerCase().replace("image/", "").replace("application/", "").replace("x-ms-", ""));
                if (k) {
                    k.responseType = "text";
                    h(k, function(a) {
                        g(JSON.parse(a))    // Line 279
                    }, f);
                    var m = new FormData,
                        n = {};
                    null != d && void 0 !== d && (n.options = d);
                    c && (n.device = c);
                    m.append("json", JSON.stringify(n));
                    m.append("blob", a);
                    k.send(m)
                }
            }

I am printing to Printer Emulator, installed from Browser Extension in Chrome, and for the direct browser print I have installed Browser Print from Zebra. Any help is appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source