@sbj42/maze-generator
Advanced tools
Comparing version 2.0.5 to 2.0.6
{ | ||
"name": "@sbj42/maze-generator", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "An infrastructure for generating mazes", | ||
@@ -5,0 +5,0 @@ "main": "src", |
@@ -30,6 +30,10 @@ var Maze = require('@sbj42/maze-generator-core').Maze; | ||
var generator; | ||
try { | ||
generator = require(options.generator); | ||
} catch (e) { | ||
throw new Error('failed to load plugin ' + options.generator + ': ' + e.toString()); | ||
if (typeof(options.generator) == 'string') { | ||
try { | ||
generator = require(options.generator); | ||
} catch (e) { | ||
throw new Error('failed to load plugin ' + options.generator + ': ' + e.toString()); | ||
} | ||
} else { | ||
generator = options.generator; | ||
} | ||
@@ -36,0 +40,0 @@ generator(maze, options); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7040
68