Skip to content

Commit c586f05

Browse files
committed
short circuit render method if template is empty
1 parent 729ccd8 commit c586f05

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/sassc/engine.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def initialize(template, options = {})
1717
end
1818

1919
def render
20+
return @template if @template.empty?
21+
2022
data_context = Native.make_data_context(@template)
2123
context = Native.data_context_get_context(data_context)
2224
native_options = Native.context_get_options(context)

0 commit comments

Comments
 (0)