diff --git a/lib/ServiceContainer/Container.js b/lib/ServiceContainer/Container.js index c569fb3..7d25b7e 100644 --- a/lib/ServiceContainer/Container.js +++ b/lib/ServiceContainer/Container.js @@ -78,8 +78,7 @@ var Container = class Container { } addCompilerPass(compiler) { - _assert2.default.strictEqual(_typeof(compiler.process), "function"); - _assert2.default.strictEqual(compiler.process.constructor.name, "GeneratorFunction"); + _assert2.default.strictEqual(_typeof(compiler.process), "function", "Compiler pass should contain process function"); this.compilers.add(compiler); } diff --git a/package.json b/package.json index 9e730af..4bb643d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "solfegejs-dependency-injection", "description": "Dependency injection for SolfegeJS", - "version": "2.1.4", + "version": "2.1.5", "author": "neolao ", "repository": "https://github.com/neolao/solfege-bundle-dependency-injection.git", "license": "MIT", diff --git a/src/ServiceContainer/Container.js b/src/ServiceContainer/Container.js index 23a7d01..0644378 100644 --- a/src/ServiceContainer/Container.js +++ b/src/ServiceContainer/Container.js @@ -140,8 +140,7 @@ export default class Container implements ContainerInterface */ addCompilerPass(compiler:CompilerPassInterface):void { - assert.strictEqual(typeof compiler.process, "function"); - assert.strictEqual(compiler.process.constructor.name, "GeneratorFunction"); + assert.strictEqual(typeof compiler.process, "function", "Compiler pass should contain process function"); this.compilers.add(compiler); }