Skip to content

Commit

Permalink
Move minified check to devAsserts only (#33381)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcebulko committed Mar 22, 2021
1 parent 777e394 commit 6f0e145
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class UserError extends Error {
* @throws {Error} when shouldBeTruthy is not truthy.
*/
function assertion(errorCls, shouldBeTruthy, opt_message, var_args) {
if (isMinifiedMode() || shouldBeTruthy) {
if (shouldBeTruthy) {
return shouldBeTruthy;
}

Expand Down Expand Up @@ -177,6 +177,10 @@ export function pureDevAssert(
opt_8,
opt_9
) {
if (isMinifiedMode()) {
return shouldBeTruthy;
}

return assertion(
Error,
shouldBeTruthy,
Expand Down

0 comments on commit 6f0e145

Please sign in to comment.