File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ var ReflectionObject = require("./object");
6
6
( ( Namespace . prototype = Object . create ( ReflectionObject . prototype ) ) . constructor = Namespace ) . className = "Namespace" ;
7
7
8
8
var Field = require ( "./field" ) ,
9
+ OneOf = require ( "./oneof" ) ,
9
10
util = require ( "./util" ) ;
10
11
11
12
var Type , // cyclic
@@ -217,7 +218,7 @@ Namespace.prototype.getEnum = function getEnum(name) {
217
218
*/
218
219
Namespace . prototype . add = function add ( object ) {
219
220
220
- if ( ! ( object instanceof Field && object . extend !== undefined || object instanceof Type || object instanceof Enum || object instanceof Service || object instanceof Namespace ) )
221
+ if ( ! ( object instanceof Field && object . extend !== undefined || object instanceof Type || object instanceof Enum || object instanceof Service || object instanceof Namespace || object instanceof OneOf ) )
221
222
throw TypeError ( "object must be a valid nested object" ) ;
222
223
223
224
if ( ! this . nested )
You can’t perform that action at this time.
0 commit comments