Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment