We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4ac1bc commit 97bf4e6Copy full SHA for 97bf4e6
src/index.mjs
@@ -14,7 +14,11 @@
14
const CACHE = {};
15
16
export default function html(statics) {
17
- const key = statics.reduce((key, s) => key + s.length + '$' + s, '');
+ let key = '';
18
+ for (let i=0; i<statics.length; i++) {
19
+ key += statics[i].length + '$' + statics[i];
20
+ }
21
+
22
const tpl = CACHE[key] || (CACHE[key] = build(statics));
23
// eslint-disable-next-line prefer-rest-params
24
return tpl(this, arguments);
0 commit comments