Fix Node.js support.

This commit is contained in:
Jonathan Puckey 2012-09-01 19:27:38 +02:00
parent cbba321977
commit 7247c1a5a2
4 changed files with 5 additions and 7 deletions

View file

@ -155,7 +155,7 @@ var PaperScript = this.PaperScript = new function() {
function evaluate(code, scope) {
// Set currently active scope.
paper = scope;
var view = scope.project.view,
var view = scope.project && scope.project.view,
res;
// Define variables for potential handlers, so eval() calls below to
// fetch their values do not require try-catch around them.