deconflict helpers when not using shared helpers

pull/339/head
Conduitry 8 years ago
parent d8dbe4e94e
commit 4cbf4e07b6

@ -410,11 +410,13 @@ export default function dom ( parsed, source, options, names ) {
`import { ${names.join( ', ' )} } from ${JSON.stringify( sharedPath )}` `import { ${names.join( ', ' )} } from ${JSON.stringify( sharedPath )}`
); );
} else { } else {
builders.main.addBlock( `var ${generator.aliases.dispatchObservers} = ${shared.dispatchObservers.toString()}` );
Object.keys( generator.uses ).forEach( key => { Object.keys( generator.uses ).forEach( key => {
const fn = shared[ key ]; // eslint-disable-line import/namespace const fn = shared[ key ]; // eslint-disable-line import/namespace
if ( key !== generator.aliases[ key ] ) {
builders.main.addBlock( `var ${generator.aliases[ key ]} = ${fn.toString()}}` );
} else {
builders.main.addBlock( fn.toString() ); builders.main.addBlock( fn.toString() );
}
}); });
} }

Loading…
Cancel
Save