From 42405379a9b2037cd24b4074068790f90144a317 Mon Sep 17 00:00:00 2001 From: Kristian Dimitrov Date: Wed, 28 Feb 2018 19:27:05 +0200 Subject: [PATCH] fix: send arguments in watchPatterns hook Need to send the arguments when we call the original method inside before-watchPatterns hook. --- lib/before-watchPatterns.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/before-watchPatterns.js b/lib/before-watchPatterns.js index 0f3d89cf..e40b2b7e 100644 --- a/lib/before-watchPatterns.js +++ b/lib/before-watchPatterns.js @@ -3,7 +3,7 @@ const { AppDirectoryLocation } = require("./constants"); module.exports = function (hookArgs) { if (hookArgs.liveSyncData && hookArgs.liveSyncData.bundle) { return (args, originalMethod) => { - return originalMethod().then(originalPatterns => { + return originalMethod(...args).then(originalPatterns => { const appDirectoryLocationIndex = originalPatterns.indexOf(AppDirectoryLocation); if (appDirectoryLocationIndex !== -1) { originalPatterns.splice(appDirectoryLocationIndex, 1);