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

Error in event handler: TypeError... #29

Open
mathe1 opened this issue Aug 19, 2018 · 0 comments
Open

Error in event handler: TypeError... #29

mathe1 opened this issue Aug 19, 2018 · 0 comments

Comments

@mathe1
Copy link

mathe1 commented Aug 19, 2018

Hi,

while programming another extension, the DevTools of Chrome catch en error:

Error in event handler for (unknown): TypeError: Cannot read property 'options' of undefined
at chrome-extension://lapbbfoohlcmlbdaakldmmallcbcbpjb/src/inject/inject.js:12:44

` function ColumnCopy() {
var that = this;

chrome.extension.sendRequest({ method: 'getOptions' }, function(response) {
  that.options = $.extend({}, response.options);
  that.init();
});

}
`

ColumnCopy did not disturb my work since now, don't know why.

You should write anything like this:
if (!response) return false; that.options = $.extend({}, response.options);

But sometimes a very useful extension!
Thank you.

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

1 participant