mirror of
https://github.com/usebruno/bruno.git
synced 2025-03-13 14:29:04 +01:00
fix
This commit is contained in:
parent
d8a01b5749
commit
bc784aaa85
@ -73,7 +73,7 @@ class Bru {
|
||||
throw new Error('Creating a env variable without specifying a name is not allowed.');
|
||||
}
|
||||
|
||||
if(!value) {
|
||||
if (value === undefined) {
|
||||
throw new Error('Creating a env variable without specifying a value is not allowed.');
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ class Bru {
|
||||
throw new Error('Creating a env variable without specifying a name is not allowed.');
|
||||
}
|
||||
|
||||
if(!value) {
|
||||
if (value === undefined) {
|
||||
throw new Error('Creating a env variable without specifying a value is not allowed.');
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ class Bru {
|
||||
throw new Error('Creating a variable without specifying a name is not allowed.');
|
||||
}
|
||||
|
||||
if(!value) {
|
||||
if (value === undefined) {
|
||||
throw new Error('Creating a variable without specifying a value is not allowed.');
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ const addBruShimToContext = (vm, bru) => {
|
||||
if (!key) {
|
||||
throw new Error('Creating a env variable without specifying a name is not allowed.');
|
||||
}
|
||||
if (!value) {
|
||||
if (value === undefined) {
|
||||
throw new Error('Creating a env variable without specifying a value is not allowed.');
|
||||
}
|
||||
bru.setEnvVar(vm.dump(key), vm.dump(value));
|
||||
@ -60,10 +60,10 @@ const addBruShimToContext = (vm, bru) => {
|
||||
getGlobalEnvVar.dispose();
|
||||
|
||||
let setGlobalEnvVar = vm.newFunction('setGlobalEnvVar', function (key, value) {
|
||||
if(!key) {
|
||||
if (!key) {
|
||||
throw new Error('Creating a env variable without specifying a name is not allowed.');
|
||||
}
|
||||
if(!value) {
|
||||
if (value === undefined) {
|
||||
throw new Error('Creating a env variable without specifying a value is not allowed.');
|
||||
}
|
||||
bru.setGlobalEnvVar(vm.dump(key), vm.dump(value));
|
||||
@ -87,7 +87,7 @@ const addBruShimToContext = (vm, bru) => {
|
||||
if (!key) {
|
||||
throw new Error('Creating a env variable without specifying a name is not allowed.');
|
||||
}
|
||||
if (!value) {
|
||||
if (value === undefined) {
|
||||
throw new Error('Creating a env variable without specifying a value is not allowed.');
|
||||
}
|
||||
bru.setVar(vm.dump(key), vm.dump(value));
|
||||
|
Loading…
Reference in New Issue
Block a user