Make filepath optional in riotconfig.

This commit is contained in:
Jason Tudisco 2022-02-10 06:00:03 -06:00
parent 8903b91d44
commit 91c0f4c0b2

View File

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