From 5208dd10c4f43b304ebeb75dcf508e016515a248 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 12 Nov 2022 10:09:36 +0200 Subject: ESLint: enable prefer-template rule (#37484) --- js/src/util/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src') diff --git a/js/src/util/index.js b/js/src/util/index.js index b04fdc120..b3e577b10 100644 --- a/js/src/util/index.js +++ b/js/src/util/index.js @@ -17,7 +17,7 @@ const TRANSITION_END = 'transitionend' const parseSelector = selector => { if (selector && window.CSS && window.CSS.escape) { // document.querySelector needs escaping to handle IDs (html5+) containing for instance / - selector = selector.replace(/#([^\s"#']+)/g, (match, id) => '#' + CSS.escape(id)) + selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`) } return selector -- cgit v1.2.3