Bind this

This commit is contained in:
斟酌 鵬兄 2015-02-06 12:45:40 +08:00
parent bee10b992f
commit ab25b7648d

View File

@ -95,7 +95,7 @@ Dragonfly.prototype.Log = function( mesg, sphere, visibility )
if( write )
{
typeof( mesg ) == "function"
? mesg( this.writeLine )
? mesg( this.writeLine.bind( this ) )
: this.writeLine( mesg )
;
}