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

Fix import and module reference #1368

Merged
merged 1 commit into from
Jul 12, 2017
Merged

Conversation

matthewlane
Copy link
Collaborator

Type of change

  • Bugfix

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

@@ -466,7 +466,7 @@ exports.insertPixel = function (url) {
} catch (e) {
}
};
this.insertElement(img);
exports.insertElement(img);
Copy link
Member

@mkendall07 mkendall07 Jul 12, 2017

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?

this.insertElement(iframe);

(no pun intended)

Copy link
Contributor

@dbemiller dbemiller Jul 12, 2017

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.

Copy link
Collaborator Author

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

dbemiller
dbemiller previously approved these changes Jul 12, 2017
* Use 'exports' for other insertElement reference
@matthewlane matthewlane force-pushed the bugfix/imptrack-function-import branch from d45b696 to b721d95 Compare July 12, 2017 16:51
@mkendall07 mkendall07 merged commit 776682f into master Jul 12, 2017
@mkendall07 mkendall07 deleted the bugfix/imptrack-function-import branch July 12, 2017 21:20
jbAdyoulike pushed a commit to jbAdyoulike/Prebid.js that referenced this pull request Sep 21, 2017
* Use 'exports' for other insertElement reference
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* Use 'exports' for other insertElement reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants