Add assertion to require callee for FunctionCall node

This commit is contained in:
Patrick Steele-Idem 2016-01-10 17:22:49 -07:00
parent 94aaab2d6c
commit f45b1f364f

View File

@ -1,4 +1,5 @@
'use strict';
var ok = require('assert').ok;
var Node = require('./Node');
@ -6,6 +7,9 @@ class FunctionCall extends Node {
constructor(def) {
super('FunctionCall');
this.callee = def.callee;
ok(this.callee, '"callee" is required');
this.args = def.args;
if (this.args && !Array.isArray(this.args)) {