Commit 89af5611 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix string detection in Js::Returns.

Because the EsprimaAdapter gives a string value to regex literals,
which is different from nil received from Esprima itself, we'll
have to check first for regex and after that for string.
parent 625bbd13
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -79,10 +79,10 @@ module JsDuck
          :this
        elsif boolean?(ast)
          "Boolean"
        elsif string?(ast)
          "String"
        elsif regexp?(ast)
          "RegExp"
        elsif string?(ast)
          "String"
        else
          :other
        end