Skip to content

Commit 77d8e7e

Browse files
authored
Merge pull request #183 from gutte/master
fix #182 fileSync takes empty string postfix option
2 parents fcbf27b + e6f772a commit 77d8e7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tmp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function fileSync(options) {
285285
args = _parseArguments(options),
286286
opts = args[0];
287287

288-
opts.postfix = opts.postfix || '.tmp';
288+
opts.postfix = (_isUndefined(opts.postfix)) ? '.tmp' : opts.postfix;
289289

290290
const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
291291
const name = tmpNameSync(opts);

0 commit comments

Comments
 (0)