diff --git a/lib/zena/use/query_builder.rb b/lib/zena/use/query_builder.rb index a411087e..62ef4511 100644 --- a/lib/zena/use/query_builder.rb +++ b/lib/zena/use/query_builder.rb @@ -349,7 +349,7 @@ def build_finder(count, rel, params = {}) else_clause = RubyLess.translate(self, "find(#{params[:else].inspect})") end - if else_clause.klass == Array + if else_clause.klass.kind_of?(Array) else_klass = else_clause.opts[:elem] if count == :all # Get first common ancestor diff --git a/test/integration/zafu_compiler/context.yml b/test/integration/zafu_compiler/context.yml index 048b56d9..d43214d1 100644 --- a/test/integration/zafu_compiler/context.yml +++ b/test/integration/zafu_compiler/context.yml @@ -17,4 +17,10 @@ set_var: dom_id_in_each: src: "
  • " tem: "/
  • <%= var2.zip %>

  • /" - res: "
  • 29

  • 33

  • " \ No newline at end of file + res: "
  • 29

  • 33

  • " + +list_else: + context: + node: status + src: "" + res: "" diff --git a/test/integration/zafu_compiler/display.yml b/test/integration/zafu_compiler/display.yml index 0cd2a72d..7d07457c 100644 --- a/test/integration/zafu_compiler/display.yml +++ b/test/integration/zafu_compiler/display.yml @@ -380,4 +380,8 @@ comment: insert_slash_slash_exclam: src: "this that blah blah" - res: "this that //! blah blah" \ No newline at end of file + res: "this that //! blah blah" + +array_literal: + src: "

    " + res: "

    one, two

    " \ No newline at end of file