diff --git a/lib/shim/core.js b/lib/shim/core.js index 47b1fd8..4fbc2a3 100644 --- a/lib/shim/core.js +++ b/lib/shim/core.js @@ -527,14 +527,23 @@ const pm = Object.freeze({ /* General variable access */ variables: Object.freeze({ get(name) { - return ( - (scope.local[Has](name) && scope.local[name]) || - (scope.data[Has](name) && scope.data[name]) || - (scope.environment[Has](name) && scope.environment[name]) || - (scope.collection[Has](name) && scope.collection[name]) || - (scope.global[Has](name) && scope.global[name]) || - undef - ); + if (scope.local[Has](name)) { + return scope.local[name]; + } + if (scope.data[Has](name)) { + return scope.data[name]; + } + if (scope.environment[Has](name)) { + return scope.environment[name]; + } + if (scope.collection[Has](name)) { + return scope.collection[name]; + } + if (scope.global[Has](name)) { + return scope.global[name]; + } + + return undef; }, set(name, value) { requireRequest();