sass renderer shouldn't explode if haml isn't available

This commit is contained in:
Thomas Reynolds 2014-06-11 10:19:10 -07:00
parent 7840ebf98a
commit c3b22fe325

View file

@ -95,7 +95,11 @@ module Middleman
# Change Sass path, for url functions, to the build folder if we're building # Change Sass path, for url functions, to the build folder if we're building
# @return [Hash] # @return [Hash]
def sass_options 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 = { more_opts = {
load_paths: ctx.config[:sass_assets_paths], load_paths: ctx.config[:sass_assets_paths],