Skip to content

Commit

Permalink
fix: add default empty filename (#99)
Browse files Browse the repository at this point in the history
* fix: add default empty filename

* Update index.js
  • Loading branch information
Kent C. Dodds committed Jan 4, 2019
1 parent 2e0badb commit 7ad592c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Expand Up @@ -136,9 +136,10 @@ function macrosPlugin(babel, {require: _require = require} = {}) {

// eslint-disable-next-line complexity
function applyMacros({path, imports, source, state, babel, interopRequire}) {
/* istanbul ignore next (pretty much only useful for astexplorer I think) */
const {
file: {
opts: {filename},
opts: {filename = ''},
},
} = state
let hasReferences = false
Expand Down

0 comments on commit 7ad592c

Please sign in to comment.