Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
weixin authored and weixin committed Nov 12, 2016
1 parent d7e63f6 commit bbea3c2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ File.prototype.act = function(fn, options) {
if(!this.source) {
throw new Error('call src() before act()!');
}
this.acts.push(fn);

if(options.global) {
this.globalActs.push(fn);
} else {
this.acts.push(fn);
}

return this;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Plugins.prototype.filter = function(runtime) {
};

Plugins.prototype.globalEnable = function() {
return this._globalEnable === false;
return !(this._globalEnable === false);
};

function Runtime(options) {
Expand Down
4 changes: 3 additions & 1 deletion lib/read_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ ReadStream.prototype._handlerAct = function() {

if (this.isVirtual) {
var acts = Data.virtualFiles[this.path].acts;
_.each(acts, this._processAct, this);
_.each(acts, function(act) {
this._processAct(act);
}, this);
}

var collectStream = through.obj(function(data, encoding, callback) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bone",
"version": "0.4.1",
"version": "0.4.2",
"description": "web frontend develop toolkit",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit bbea3c2

Please sign in to comment.