"Unhandled promise rejection TypeMismatchError" in internet explorer 11

575 Views Asked by At

I am using a port for javascript bases on potrace: https://github.com/kilobtye/potrace this library converts images to svg Everything works except for(ofcourse...) internet explorer 11. i get the error: "Unhandled promise rejection TypeMismatchError"

There is hardly anything that can be found about this library so i would hope any of you code guru's could help me out.

Here is the code i use: value is a base64 string of a image

    static changeLogo(value) {
        $("#svg-image svg, #svg-image svg").empty();
        Potrace.loadImageFromUrl(value);
        Potrace.process(function () {
            let svgImage = Potrace.getSVG(1);
            $("#svg-image").append(svgImage);
        })
    }
1

There are 1 best solutions below

0
On

According to the potrace online demo, it seems that when we use this plugin, we could only use the loadImageFromFile() and loadImageFromUrl() method to load image, instead of using the base64 string.