Skip to content

Commit

Permalink
jshint ignores and destPath type checking on write
Browse files Browse the repository at this point in the history
  • Loading branch information
nmccready committed Oct 13, 2016
1 parent 8bad174 commit 5e97199
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var utils = require('./utils'),
function write(destPath, options) {
var debug = require('debug-fabulous')()(PLUGIN_NAME + ':write');

if (options === undefined && Object.prototype.toString.call(destPath) === '[object Object]') {
if (options === undefined && typeof destPath !== 'string') {
options = destPath;
destPath = undefined;
}
Expand Down Expand Up @@ -106,10 +106,13 @@ function write(destPath, options) {
};
break;
default:
/* jshint ignore:start */
commentFormatter = function(url) { return ""; };
/* jshint ignore:end */
}

var comment, sourceMappingURLPrefix;
var comment;

if (destPath === undefined || destPath === null) {
// encode source map into comment
var base64Map = new Buffer(JSON.stringify(sourceMap)).toString('base64');
Expand Down

0 comments on commit 5e97199

Please sign in to comment.