Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

This is not defined #44

Open
hblab-huongdv opened this issue Jul 1, 2019 · 1 comment
Open

This is not defined #44

hblab-huongdv opened this issue Jul 1, 2019 · 1 comment

Comments

@hblab-huongdv
Copy link

hblab-huongdv commented Jul 1, 2019

I got this error when starting the application

error

@hblab-huongdv hblab-huongdv changed the title I got this error when starting the application This is not defined Jul 1, 2019
@scailbc
Copy link

scailbc commented Dec 20, 2019

Somehow the arrow functions are not supoprted.

If you change this:

  _enableAllLinks () {
    const links = document.querySelectorAll('.js-item-link');

    Array.from(links).forEach(link => {
      link.classList.remove('item--disabled');
      link.removeEventListener('click', this._cancel);
    });

    return Promise.resolve();
  }

With this:

_enableAllLinks () {
    const links = document.querySelectorAll('.js-item-link');

    const linksArray = Array.from(links);
    for( let link of linksArray ) {
      link.removeEventListener('click', this._offlineCache._cancel);
    }

    return Promise.resolve();
  }

The error will disappear. Unfortunately you should change all the arrow functions.

I think this is a problem of configurations, for example, what version of NodeJS was used in this project? There are some global npm libraries that we should install?

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

No branches or pull requests

2 participants