Skip to content

Commit

Permalink
Merge pull request #229 from Conduitry/escape-shared-path
Browse files Browse the repository at this point in the history
Properly escape sharedPath in generated import statements
  • Loading branch information
Rich-Harris authored Jan 3, 2017
2 parents 78c0759 + c44fbe9 commit 5737c60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generators/dom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export default function dom ( parsed, source, options, names ) {

const names = [ 'get', 'fire', 'observe', 'on', 'dispatchObservers' ].concat( Object.keys( generator.uses ) );
builders.main.addLineAtStart(
`import { ${names.join( ', ' )} } from '${sharedPath}'`
`import { ${names.join( ', ' )} } from ${JSON.stringify( sharedPath )}`
);
} else {
builders.main.addBlock( shared.dispatchObservers.toString() );
Expand Down

0 comments on commit 5737c60

Please sign in to comment.