diff --git a/components/drawer/Drawer.vue b/components/drawer/Drawer.vue
index 2ec8b0993..c56df872d 100644
--- a/components/drawer/Drawer.vue
+++ b/components/drawer/Drawer.vue
@@ -6,7 +6,7 @@
@MDCDrawer:opened="onOpened"
>
-
@@ -114,10 +110,8 @@ export default {
}
},
mounted () {
- // the slots can only be accessible in nextTick
+ // to avoid error throw by focus trap
this.$nextTick(function () {
- // judge whether the slots have the header class
- this.hasHeaderClass = this.$slots.header[0].elm.classList.contains('mdc-drawer__header')
if (!this.mdcDrawer && (this.dismissible || this.modal)) { this.mdcDrawer = new MDCDrawer(this.$el) }
})
},
diff --git a/components/drawer/__test__/__snapshots__/Drawer.spec.js.snap b/components/drawer/__test__/__snapshots__/Drawer.spec.js.snap
index 37e1f91f2..4625678b1 100644
--- a/components/drawer/__test__/__snapshots__/Drawer.spec.js.snap
+++ b/components/drawer/__test__/__snapshots__/Drawer.spec.js.snap
@@ -2,28 +2,19 @@
exports[`Drawer should render as dismissible 1`] = `
`;
exports[`Drawer should render as modal 1`] = `
`;
exports[`Drawer should render with no prop 1`] = `
`;