From 8ddd5c6dcbfa6d81a063b37aee4021ebf34d18f0 Mon Sep 17 00:00:00 2001 From: Abhinay Omkar Date: Tue, 14 Jan 2020 20:36:17 -0500 Subject: [PATCH] fix(auto-init): Fixed issue with multiple default exports (#5464) --- packages/mdc-auto-init/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mdc-auto-init/index.ts b/packages/mdc-auto-init/index.ts index deb9e866ae1..b0693064c3f 100644 --- a/packages/mdc-auto-init/index.ts +++ b/packages/mdc-auto-init/index.ts @@ -64,7 +64,7 @@ function emit(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); @@ -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};