mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Minor fix
This commit is contained in:
parent
d55249919e
commit
eb740c2452
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ var path = require('path');
|
||||||
// Determine the name by which name the module was required (either 'paper',
|
// Determine the name by which name the module was required (either 'paper',
|
||||||
// 'paper-jsdom' or 'paper-jsdom-canvas'), and use this to determine if error
|
// 'paper-jsdom' or 'paper-jsdom-canvas'), and use this to determine if error
|
||||||
// exceptions should be thrown or if loading should fail silently.
|
// exceptions should be thrown or if loading should fail silently.
|
||||||
var parent = module.parent ? module.parent.parent : null,
|
var parent = module.parent && module.parent.parent,
|
||||||
requireName = parent && path.basename(path.dirname(parent.filename));
|
requireName = parent && path.basename(path.dirname(parent.filename));
|
||||||
requireName = /^paper/.test(requireName) ? requireName : 'paper';
|
requireName = /^paper/.test(requireName) ? requireName : 'paper';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue