Skip to content

Commit e6f772a

Browse files
fix #182 fileSync takes empty string postfix option
1 parent fcbf27b commit e6f772a

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)