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()