From 99e127d3f4067e20631984c783a7ed2b7298ed78 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 13 Feb 2018 13:10:24 +0100 Subject: [PATCH] make browserfiles. exists async --- src/app/files/browser-files.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/files/browser-files.js b/src/app/files/browser-files.js index ce645a083c..3117ff898c 100644 --- a/src/app/files/browser-files.js +++ b/src/app/files/browser-files.js @@ -8,12 +8,12 @@ function Files (storage) { var readonly = {} this.type = 'browser' - this.exists = function (path) { + this.exists = function (path, cb) { var unprefixedpath = this.removePrefix(path) // NOTE: ignore the config file - if (path === '.remix.config') return false + if (path === '.remix.config') return cb(null, false) - return this.isReadOnly(unprefixedpath) || storage.exists(unprefixedpath) + return cb(null, this.isReadOnly(unprefixedpath) || storage.exists(unprefixedpath)) } this.init = function (cb) {