summaryrefslogtreecommitdiff
path: root/iridescence/src
diff options
context:
space:
mode:
Diffstat (limited to 'iridescence/src')
-rw-r--r--iridescence/src/views/Admin.vue18
1 files changed, 11 insertions, 7 deletions
diff --git a/iridescence/src/views/Admin.vue b/iridescence/src/views/Admin.vue
index f1cf227..6bb161a 100644
--- a/iridescence/src/views/Admin.vue
+++ b/iridescence/src/views/Admin.vue
@@ -29,13 +29,17 @@ export default {
ProductSearch
},
beforeRouteEnter: (to, from, next) => {
- fetch(process.env.VUE_APP_LOGIN_URL).then(res => {
- if (res.status == 401) {
- next(false);
- } else {
- next();
- }
- });
+ if (!process.env.VUE_APP_LOGIN_URL) {
+ next();
+ } else {
+ fetch(process.env.VUE_APP_LOGIN_URL).then(res => {
+ if (res.status == 401) {
+ next(false);
+ } else {
+ next();
+ }
+ });
+ }
}
};
</script>