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

Throws exceptions in Edge due to nulls. #1

Closed
m1dst opened this issue Mar 28, 2019 · 1 comment
Closed

Throws exceptions in Edge due to nulls. #1

m1dst opened this issue Mar 28, 2019 · 1 comment

Comments

@m1dst
Copy link

m1dst commented Mar 28, 2019

_setDataUrl: function (tile, url) {

I resolved with... hope it helps

        _setDataUrl: function (tile, url) {
            var self = this;
            return new Promise(function (resolve, reject) {
                if (self.dtable === null || !self.dtable) {
                    reject();
                }
                else {
                    self.dtable.get(self._getStorageKey(url)).then(function (data) {
                        if (data && typeof data === 'object') {
                            resolve(URL.createObjectURL(data));
                        } else {
                            reject();
                        }
                    }).catch((e) => { reject(e); });   //console.log(e); 
                }
            }); //dont catch here, handled upstream
        },
@helgasoft
Copy link
Owner

good catch, thank you. Code is now updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants