mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-29 00:51:30 +08:00
Fixed instability in type-loader
This commit is contained in:
@@ -29,7 +29,7 @@ module.exports = function loadTypes(basepath, fn) {
|
||||
try {
|
||||
debug('Loading', require('path').resolve(path) + '/node_modules/' + file);
|
||||
var c = require(require('path').resolve(path) + '/node_modules/' + file);
|
||||
if(c.prototype.__resource__) {
|
||||
if(c && c.prototype && c.prototype.__resource__) {
|
||||
debug('is a resource ', c && c.name);
|
||||
types[c.name] = c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user