Skip to content

Commit

Permalink
fix: disabling safeClassNames when not developing locally
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Jun 7, 2023
1 parent e06df04 commit 1bb5ced
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/transformers/safeClassNames.js
Expand Up @@ -7,13 +7,14 @@ module.exports = async (html, config = {}, direct = false) => {
/*
* Don't run when:
* - `config` is falsy or empty
* - developing locally and `safeClassNames` is not explicitly
* set to `true`
* - developing locally and `safeClassNames` is not explicitly `true`
* - `safeClassNames` is explicitly `false`
*/
if (
!config
|| isEmpty(config)
|| (get(config, 'env') === 'local' && get(config, 'safeClassNames') !== true)
|| get(config, 'safeClassNames') === false
) {
return html
}
Expand Down

0 comments on commit 1bb5ced

Please sign in to comment.