D
D
durnevdanya2017-07-03 15:32:17
JavaScript
durnevdanya, 2017-07-03 15:32:17

Why does it issue an Unexpected Token?

Good afternoon. I am developing an android application on Ionic. Faced such problem that I get Runtime Error(Unexpected Token)
Application on Ionic is written on Typescript. But the problem is that if you run the application in the browser, then everything works, but if you run it on android, which I do, then this error occurs.
m51OxFUqT0I.jpg
The problem is that the line number is not written. But I figured out what is causing the error.
The code of the method I am calling

transformToTriangle() {
        let config = {
            EDGE_DETECT_VALUE:80, 
            POINT_RATE:0.075, 
            POINT_MAX_NUM:3500, 
            BLUR_SIZE:2, 
            EDGE_SIZE:8, 
            PIXEL_LIMIT: 350000
        }
        let updatedPhoto = new LowPoly(this.base64Image, config).init().then((data) => {
            this.base64Image = data; // Фотография заменяется новой, отредактированной
        });
    }

Third party library written in JS. It works in the browser, on the phone, no, this error crashes. If you completely remove this method transformToTriangle(), then everything works on the phone (the photo, of course, is not edited, there is no method, but at least this error does not come out).
He swears at a comma, I'm sure this one --> new LowPoly(this.base64Image,config)
What should I do? Why does the error appear only on the device?
I tried reinstalling and rebuilding, and abortOnStart : false is in build.gradle. Help
Thanks in advance
P.S
Problem in build/main.js file
490fd3641f57454897e311d189e57100.png57e516e2af5c40d4bdc51a1caac28a67.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question