From 848fdb74a29d4fe2f6bdffdfb210f32098c628c6 Mon Sep 17 00:00:00 2001 From: Kyle Corbitt Date: Fri, 5 Aug 2016 18:48:44 -0700 Subject: [PATCH] make mkdir options optional This PR simplifies the code slightly by using a Javascript default value for `mkdir`'s `options` parameter. It also fixes a flow error that otherwise occurs when `mkdir` is called with only one argument. --- FS.common.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/FS.common.js b/FS.common.js index 61ca095..f891937 100644 --- a/FS.common.js +++ b/FS.common.js @@ -118,9 +118,7 @@ type FSInfoResult = { var RNFS = { - mkdir(filepath: string, options: MkdirOptions): Promise { - options = options || {}; - + mkdir(filepath: string, options: MkdirOptions = {}): Promise { return RNFSManager.mkdir(filepath, options).then(() => void 0); },