From 3b062f79fccd99ebbcf92951cd3e205d574a06d6 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Sun, 16 Feb 2020 20:37:54 +1100 Subject: [PATCH] FIX: invalid syntax in elsif in Theme importer elsif had a check that assigned to vars, this is not valid syntax and could explode at runtime --- lib/stylesheet/importer.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/stylesheet/importer.rb b/lib/stylesheet/importer.rb index 060243ae9f3..2a09b4d192d 100644 --- a/lib/stylesheet/importer.rb +++ b/lib/stylesheet/importer.rb @@ -207,10 +207,13 @@ module Stylesheet end elsif callback = Importer.special_imports[asset] instance_eval(&callback) - elsif (path, source = match_theme_import(asset, parent_path)) - Import.new(path, source: source) else - Import.new(asset + ".scss") + path, source = match_theme_import(asset, parent_path) + if path && source + Import.new(path, source: source) + else + Import.new(asset + ".scss") + end end end end