Catch empty input

This commit is contained in:
Devine Lu Linvega 2019-07-15 14:28:49 +09:00
parent ef9e72cdcd
commit 5c6e78eab5

View File

@ -66,6 +66,8 @@ function Lisp (input, lib) {
} }
const interpret = function (input, context) { const interpret = function (input, context) {
if (!input) { return null }
if (context === undefined) { if (context === undefined) {
return interpret(input, new Context(lib)) return interpret(input, new Context(lib))
} else if (input instanceof Array) { } else if (input instanceof Array) {