Skip to content

Commit

Permalink
fix(auto-init): Fixed issue with multiple default exports (#5464)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhiomkar authored Jan 15, 2020
1 parent d07c78d commit 8ddd5c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/mdc-auto-init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function emit<T extends object>(evtType: string, evtData: T, shouldBubble = fals
/**
* Auto-initializes all MDC components on a page.
*/
export function mdcAutoInit(root = document) {
function mdcAutoInit(root = document) {
const components = [];
let nodes: Element[] = [].slice.call(root.querySelectorAll(`[${AUTO_INIT_ATTR}]`));
nodes = nodes.filter((node) => node.getAttribute(AUTO_INIT_STATE_ATTR) !== INITIALIZED_STATE);
Expand Down Expand Up @@ -122,3 +122,4 @@ mdcAutoInit.deregisterAll = function() {

// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.
export default mdcAutoInit;
export {mdcAutoInit};

0 comments on commit 8ddd5c6

Please sign in to comment.