Skip to content

Commit

Permalink
fix: handle undefined DEBUG (#942)
Browse files Browse the repository at this point in the history
Closes #941
  • Loading branch information
aschmidt93 authored Dec 9, 2024
1 parent 27addac commit dd2da3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db-service/lib/cqn2sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class CQN2SQLRenderer {
const sanitize_values = process.env.NODE_ENV === 'production' && cds.env.log.sanitize_values !== false


if (LOG_SQL._debug || LOG_SQLITE._debug) {
if (DEBUG && (LOG_SQL._debug || LOG_SQLITE._debug)) {
let values = sanitize_values && (this.entries || this.values?.length > 0) ? ['***'] : this.entries || this.values || []
if (values && !Array.isArray(values)) {
values = [values]
Expand Down

0 comments on commit dd2da3a

Please sign in to comment.