Skip to content

Commit 28c2e84

Browse files
Update name check
1 parent fd881e2 commit 28c2e84

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/plugin/VResizeDrawer.vue

+4-7
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ import {
6565
import { IconOptions, useDisplay, useTheme } from 'vuetify';
6666
import { VNavigationDrawer } from 'vuetify/components';
6767
import { AllProps } from '@utils/props';
68-
import { componentName } from '@utils/globals';
6968
import {
7069
useGetStorage,
7170
useSetStorage,
@@ -135,13 +134,8 @@ const display = useDisplay();
135134
136135
137136
// -------------------------------------------------- Life Cycle Hooks //
138-
if (settings.value.location !== 'start' && settings.value.location !== 'end' && settings.value.location !== 'left' && settings.value.location !== 'right') {
139-
throw new Error("[VResizeDrawer]: 'top' and 'bottom' locations are not supported.");
140-
}
141-
142137
onBeforeMount(() => {
143-
console.log(componentName);
144-
if (settings.value.name === componentName) {
138+
if (typeof settings.value.name === 'undefined') {
145139
settings.value.name = String(Math.floor(Math.random() * (10000 * 10000)));
146140
}
147141
});
@@ -157,6 +151,9 @@ onUnmounted(() => {
157151
158152
// -------------------------------------------------- Init //
159153
function init(): void {
154+
if (settings.value.location !== 'start' && settings.value.location !== 'end' && settings.value.location !== 'left' && settings.value.location !== 'right') {
155+
throw new Error("[VResizeDrawer]: 'top' and 'bottom' locations are not supported.");
156+
}
160157
161158
// Disable resize if rail is set //
162159
if (settings.value.rail) {

0 commit comments

Comments
 (0)