Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dataPaths.forEach((path, i) => {
try {
if (fs.existsSync(path)) {
const htmlData = JSON.parse(fs.readFileSync(path, 'utf-8'));
providers.push(newHTMLDataProvider(`customProvider${i}`, htmlData));
}
} catch (err) {
console.log(`Failed to load tag from ${path}`);
}
});