diff --git a/Gruntfile.js b/Gruntfile.js index 7f994e4..900072c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -106,7 +106,10 @@ module.exports = function(grunt) { sourceMap: DEBUG, sourceMapIncludeSources: DEBUG, mangle: !DEBUG, - compress: !DEBUG, + // Disable the `merge_vars` option in the compression phase. + // `merge_vars` aggressively reuses variable names, which can lead to + // unexpected behavior or runtime errors in certain cases. + compress: DEBUG ? false : { merge_vars: false }, // eslint-disable-line camelcase beautify: DEBUG, }, },