diff --git a/assets/global.js b/assets/global.js index 345cf34..059b0a6 100644 --- a/assets/global.js +++ b/assets/global.js @@ -4,8 +4,8 @@ $(document).ready(function(){ // initiate MDC drawer // const drawer = new mdc.drawer.MDCDrawer.attachTo(document.querySelector('.mdc-drawer')); - const drawer = mdc.drawer.MDCDrawer.attachTo(document.querySelector('.mdc-drawer')); - const topAppBar = mdc.topAppBar.MDCTopAppBar.attachTo(document.getElementById('app-bar')); + const drawer = new mdc.drawer.MDCDrawer.attachTo(document.querySelector('.mdc-drawer')); + const topAppBar = new mdc.topAppBar.MDCTopAppBar.attachTo(document.getElementById('app-bar')); topAppBar.listen('MDCTopAppBar:nav', () => { drawer.open = !drawer.open; });