Remove __dirname usage from loadAddon

This commit is contained in:
Paris Kasidiaris
2016-10-09 13:17:17 +03:00
parent 8117999ab3
commit 763f148fa1
+1 -1
View File
@@ -642,7 +642,7 @@ Terminal.prototype.open = function(parent) {
Terminal.loadAddon = function(addon, callback) {
if (typeof exports === 'object' && typeof module === 'object') {
// CommonJS
return require(__dirname + '/../addons/' + addon);
return require('../addons/' + addon);
} else if (typeof define == 'function') {
// RequireJS
return require(['../addons/' + addon + '/' + addon], callback);