diff --git a/compiler/Compiler.js b/compiler/Compiler.js index 1af6d799c..5fe75750c 100644 --- a/compiler/Compiler.js +++ b/compiler/Compiler.js @@ -71,8 +71,9 @@ class Compiler { } compile(src, filename) { - ok(src); - ok(filename); + ok(typeof src === 'string', '"src" argument should be a string'); + ok(filename, '"filename" argument is required'); + ok(typeof filename === 'string', '"filename" argument should be a string'); var context = new CompileContext(src, filename, this.builder);