Skip to content

Commit 53d4f3b

Browse files
committed
Drop function names to avoid Terser bug [-50b]
1 parent 88b7704 commit 53d4f3b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const MODE_ATTRIBUTE = 13;
3939
const MODE_SKIP = 47;
4040

4141
/** Create a template function given strings from a tagged template. */
42-
function build(statics) {
42+
const build = (statics) => {
4343
let out = 'return ';
4444
let buffer = '';
4545
let mode = MODE_WHITESPACE;
@@ -51,7 +51,7 @@ function build(statics) {
5151
let quote = 0;
5252
let slash, charCode, inTag, propName, propHasValue;
5353

54-
function commit() {
54+
const commit = () => {
5555
if (!inTag) {
5656
if (field || (buffer = buffer.replace(/^\s*\n\s*|\s*\n\s*$/g,''))) {
5757
if (hasChildren++) out += ',';
@@ -92,7 +92,7 @@ function build(statics) {
9292
mode = MODE_WHITESPACE;
9393
}
9494
buffer = field = '';
95-
}
95+
};
9696

9797
for (let i=0; i<statics.length; i++) {
9898
if (i > 0) {
@@ -178,4 +178,4 @@ function build(statics) {
178178
}
179179
commit();
180180
return Function('h', '$_h', out);
181-
}
181+
};

0 commit comments

Comments
 (0)