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: check for url being null before accessing __esModules property #1005

Closed
wants to merge 1 commit into from

Conversation

charlessuh
Copy link

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Perhaps this is an unusual use case, but I'm using a custom final loader which can export null (i.e. the source is module.exports = null), e.g. if it determines a module will not be needed.

I suppose I could export an empty object, but in some cases I need to check if a module was removed in this manner, and it's easier to check for null which is falsy (as opposed to an empty object which is truthy.)

Breaking Changes

n/a

Additional Info

n/a

@jsf-clabot
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

@codecov
Copy link

codecov bot commented Dec 5, 2019

Codecov Report

Merging #1005 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1005   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files          10       10           
  Lines         435      435           
  Branches      127      127           
=======================================
  Hits          433      433           
  Misses          2        2
Impacted Files Coverage Δ
src/runtime/getUrl.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80e9662...5d02a87. Read the comment docs.

@alexander-akait
Copy link
Member

Need test

@alexander-akait
Copy link
Member

What is use case using null? Can you provide example?

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

Successfully merging this pull request may close these issues.

4 participants