remove redundant parens

pull/5701/head
Rich Harris 5 years ago
parent e58d65822a
commit 57bb045cd1

@ -44,7 +44,7 @@ const escapes = {
export function escape(html: string, attr: 0 | 1 = 0) { export function escape(html: string, attr: 0 | 1 = 0) {
if (typeof html !== 'string') return html; if (typeof html !== 'string') return html;
const pattern = (attr ? ATTR_REGEX : CONTENT_REGEX); const pattern = attr ? ATTR_REGEX : CONTENT_REGEX;
pattern.lastIndex = 0; pattern.lastIndex = 0;
let escaped = ''; let escaped = '';

Loading…
Cancel
Save