Skip to content

Commit

Permalink
Fix circular dependency of Namespace and Enum (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardpauli authored and dcodeIO committed Apr 6, 2018
1 parent c05c58f commit f13a81f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ module.exports = Namespace;
var ReflectionObject = require("./object");
((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace";

var Enum = require("./enum"),
Field = require("./field"),
var Field = require("./field"),
util = require("./util");

var Type, // cyclic
Service; // "
Service,
Enum;

/**
* Constructs a new namespace instance.
Expand Down Expand Up @@ -428,4 +428,5 @@ Namespace.prototype.lookupService = function lookupService(path) {
Namespace._configure = function(Type_, Service_) {
Type = Type_;
Service = Service_;
Enum = require("./enum");
};

0 comments on commit f13a81f

Please sign in to comment.