From 372291ad02863f69f7f727bc89839251951db5b0 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 10 Apr 2019 16:32:37 -0700 Subject: [PATCH] Collapse a weirdly structured clause in env.cpp --- src/env.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/env.cpp b/src/env.cpp index fa071cd42..2bd72e2cd 100644 --- a/src/env.cpp +++ b/src/env.cpp @@ -900,12 +900,9 @@ maybe_t env_stack_t::get(const wcstring &key, env_mode_flags_t mode) env = vars_stack().next_scope_to_search(env); } } - - if (!search_universal) return none(); - // Okay, we couldn't find a local or global var given the requirements. If there is a matching // universal var return that. - if (uvars()) { + if (search_universal && uvars()) { auto var = uvars()->get(key); if (var && (var->exports() ? search_exported : search_unexported)) { return var;