Skip to content
This repository has been archived by the owner on Jan 13, 2018. It is now read-only.

Commit

Permalink
Fix stupid __defineGetter__() usage in BlockNode
Browse files Browse the repository at this point in the history
  • Loading branch information
arikon committed Aug 5, 2013
1 parent ff472fc commit 4ce3251
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/nodes/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,15 @@ registry.decl(BlockNodeName, MagicNode, {
// Lazy level initialization for the cases when level config is not exists
// at the time node object created
var level;
this.__defineGetter__('level', {
get: function() {
if (!level) {
level = typeof o.level === 'string' ?
createLevel(PATH.resolve(o.root, o.level), {
projectRoot: o.root
}) :
o.level;
}
return level;
this.__defineGetter__('level', function() {
if (!level) {
level = typeof o.level === 'string' ?
createLevel(PATH.resolve(o.root, o.level), {
projectRoot: o.root
}) :
o.level;
}
return level;
});
/* jshint +W106 */

Expand Down

0 comments on commit 4ce3251

Please sign in to comment.