Skip to content

Commit

Permalink
#96 lint fixes for loadFileAsDataURI.js
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom authored and jonathanolson committed Feb 18, 2015
1 parent 845d5f8 commit f6b8d05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion grunt/jshintOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ module.exports = {
alert: false, //for debugging on ipad
numeric: false, //Numeric library used in energy skate park
location: false, //For setting location.href to save to local file, see http://stackoverflow.com/questions/2897619/using-html5-javascript-to-generate-and-save-a-file
FileReader: false //For file loading, see SaveLoadNode in Energy Skate Park: Basics
FileReader: false, //For file loading, see SaveLoadNode in Energy Skate Park: Basics
Buffer: false
}
};

2 changes: 1 addition & 1 deletion requirejs-plugins/loadFileAsDataURI.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ define( function() {
throw new Error( 'Unknown mime type for filename: ' + filename );
}

var base64 = 'data:' + mimeType + ';base64,' + Buffer( fs.readFileSync( filename ) ).toString( 'base64' );
var base64 = 'data:' + mimeType + ';base64,' + new Buffer( global.fs.readFileSync( filename ) ).toString( 'base64' );
return base64;
};
} );

0 comments on commit f6b8d05

Please sign in to comment.