Skip to content

Commit

Permalink
update environment check pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
skullydazed committed May 26, 2021
1 parent ccd9f40 commit 0a544e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/modules/constants.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import template from 'lodash/template';

export const backend_baseurl = process.env.VUE_APP_API_URL;
if (!backend_baseurl) {
if (isUndefined(backend_baseurl)) {
throw 'Backend URL has not been specified';
}
export const keyboards_baseurl = process.env.VUE_APP_KEYBOARDS_URL;
if (!keyboards_baseurl) {
if (isUndefined(keyboards_baseurl)) {
throw 'Keyboard Metadata URL has not been specified';
}
export const backend_keyboards_url = `${keyboards_baseurl}/v1/keyboards`;
Expand Down

1 comment on commit 0a544e6

@yanfali
Copy link
Collaborator

@yanfali yanfali commented on 0a544e6 May 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably not going to work without an import statement.

Add

import isUndefined from 'lodash/isUndefined';

Please sign in to comment.