diff --git a/middleman-core/lib/middleman-core/renderers/sass.rb b/middleman-core/lib/middleman-core/renderers/sass.rb index 3baf2872..b5642655 100644 --- a/middleman-core/lib/middleman-core/renderers/sass.rb +++ b/middleman-core/lib/middleman-core/renderers/sass.rb @@ -95,7 +95,11 @@ module Middleman # Change Sass path, for url functions, to the build folder if we're building # @return [Hash] def sass_options - ctx = ::Middleman::Renderers::Haml.last_haml_scope || @context + ctx = if defined?(::Middleman::Renderers::Haml) + ::Middleman::Renderers::Haml.last_haml_scope || @context + else + @context + end more_opts = { load_paths: ctx.config[:sass_assets_paths],