-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix import and module reference #1368
Conversation
@@ -466,7 +466,7 @@ exports.insertPixel = function (url) { | |||
} catch (e) { | |||
} | |||
}; | |||
this.insertElement(img); | |||
exports.insertElement(img); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this
reference be updated too?
Line 482 in 35e68ae
this.insertElement(iframe); |
(no pun intended)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record.... most of the functions in this file actually do this. I fixed a couple in the video cache PR too.
Some are easy to fix, but some aren't. Not sure which category insertElement
is in, or how deep down the rabbit hole you want this to go... or if we should just file a ticket and schedule the time to fix them all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the other insertElement
reference as well. I'd like to go through utils and update remaining this
references at some point, or convert to ES module syntax entirely, but for now just scoped this PR to insertElement
references
* Use 'exports' for other insertElement reference
d45b696
to
b721d95
Compare
* Use 'exports' for other insertElement reference
* Use 'exports' for other insertElement reference
Type of change
Description of change
Fixes function that was being imported as a default, but wasn't a default export. Also updates util references so that exported functions work when imported with ES module syntax