Skip to content

fix(env): check for undefined on process (closes #2958) #2959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/utils/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export const hasPointerEvent = inBrowser && Boolean(window.PointerEvent || windo

// Getters

export const getNoWarn = () => process && process.env && process.env.BOOTSTRAP_VUE_NO_WARN
export const getNoWarn = () =>
typeof process !== 'undefined' && process && process.env && process.env.BOOTSTRAP_VUE_NO_WARN
2 changes: 1 addition & 1 deletion src/utils/warn.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('utils/warn', () => {

describe('without process object', () => {
beforeEach(() => {
global.process = null
delete global.process
})

it('calls console.warn()', () => {
Expand Down