Skip to content

Commit ac1e87a

Browse files
committed
simpler transform
1 parent faf0685 commit ac1e87a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

babel-preset/transforms/transform-remove-console.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = function (babel) {
77
if (path.get("callee").matchesPattern("console", true)) {
88
path.node.callee = template(`
99
(function () {
10-
Array.prototype.slice.call(arguments).forEach(m => (typeof m === 'function') ? m() : m)
10+
return undefined
1111
})
1212
`)().expression
1313
}

0 commit comments

Comments
 (0)