Skip to content

Commit

Permalink
fix minificatiob logic
Browse files Browse the repository at this point in the history
  • Loading branch information
outofambit committed Mar 1, 2019
1 parent 2d1b5de commit ab50600
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ p5.prototype._createFriendlyGlobalFunctionBinder = function(options) {
return function(prop, value) {
if (
!p5.disableFriendlyErrors &&
typeof IS_MINIFIED === 'undefined' &&
typeof process.env.IS_MINIFIED === 'undefined' &&
typeof value === 'function' &&
!(prop in p5.prototype._preloadMethods)
) {
Expand Down
4 changes: 3 additions & 1 deletion tasks/build/browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ module.exports = function(grunt) {
const outputFilename = isMin ? 'p5.min.js' : 'p5.js';
const srcFilePath = path.join(__dirname, '../../src/app.js');

process.env.IS_MINIFIED = isMin ? true : undefined;
if (isMin) {
process.env.IS_MINIFIED = true;
}

const options = {
outDir: './lib',
Expand Down

0 comments on commit ab50600

Please sign in to comment.