From 91c0f4c0b2d585a6fe9e76aa758e2a4ab385e0f8 Mon Sep 17 00:00:00 2001 From: Jason Tudisco Date: Thu, 10 Feb 2022 06:00:03 -0600 Subject: [PATCH] Make filepath optional in riotconfig. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 60be5c3..86223a8 100644 --- a/index.js +++ b/index.js @@ -33,8 +33,8 @@ module.exports = new Transformer({ } ) const shouldInvalidateOnStartup = riotConfig && - riotConfig.filePath.endsWith('.js') || - riotConfig.filePath.endsWith(CONFIG_FILES[0]) + riotConfig?.filePath?.endsWith('.js') || + riotConfig?.filePath?.endsWith(CONFIG_FILES[0]) if (shouldInvalidateOnStartup) { config.invalidateOnStartup()