diff options
Diffstat (limited to 'downloaders.js')
-rw-r--r-- | downloaders.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/downloaders.js b/downloaders.js index 1e2a9e9..b7582a9 100644 --- a/downloaders.js +++ b/downloaders.js @@ -19,6 +19,11 @@ const copyFile = fse.copy const cachify = (identifier, baseFunction) => { return async arg => { + // If there was no argument passed (or it aws empty), nothing will work.. + if (!arg) { + throw new TypeError('Expected a downloader argument') + } + // Determine where the final file will end up. This is just a directory - // the file's own name is determined by the downloader. const cacheDir = downloaders.rootCacheDir + '/' + identifier |