fix(file): initialize writeFile options (#468)

This commit is contained in:
Robert Coie 2016-08-22 15:18:53 -07:00 committed by Ibrahim Hadeed
parent 38ff6f2a32
commit 16628a49f7

View File

@ -669,7 +669,7 @@ export class File {
return Promise.reject(err);
}
let opts: WriteOptions;
let opts: WriteOptions = {};
if (replaceOrOptions) {
if (typeof(replaceOrOptions) === 'boolean') {
opts.replace = <boolean>replaceOrOptions;