bminer / node-blade

Blade - HTML Template Compiler, inspired by Jade & Haml
Other
320 stars 28 forks source link

compiler.js broken if this.options.basedir is undefined #151

Closed nemophrost closed 11 years ago

nemophrost commented 11 years ago

Line 41 of compiler.js causes an error if you haven't set this.options.baseDir. Not sure if this is a new bug introduced with the latest release of Node.

I change the line (as a temporary fix) to: this.options.basedir = this.options.basedir ? path.resolve(this.options.basedir) : process.cwd();

nemophrost commented 11 years ago

Note: This was specifically encountered when using blade.renderFile()

bminer commented 11 years ago

Confirmed. This was changed with the release of Node 0.10.0. https://github.com/joyent/node/commit/089ec586135726e82dc0d25c2e328478d577db24

I will push a fix out right away.

bminer commented 11 years ago

Thanks for the bug report!