1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-01-29 10:20:52 +01:00

Use fs.readFileSync + JSON.parse to read compile options (#702)

This commit is contained in:
Koute 2023-08-06 13:16:02 +01:00 committed by GitHub
parent 1b0356812d
commit a8b3eb11f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,7 +283,7 @@ export const getCompileOptions = () => {
if (fs.existsSync('../compile-options.json')) {
try {
const tempOptions = require('../compile-options.json')
const tempOptions = JSON.parse(fs.readFileSync('../compile-options.json').toString())
if (typeof tempOptions !== 'object') {
throw 'Compile options file does not contain an json object'