mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Add assertion to require callee for FunctionCall node
This commit is contained in:
parent
94aaab2d6c
commit
f45b1f364f
@ -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)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user