Skip to content

Commit 52236a7

Browse files
committed
apply same method on all .filter(Boolean)
1 parent ab52562 commit 52236a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

web_src/js/features/repo-settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function initRepoSettingsBranches() {
101101
// show the `Matched` mark for the status checks that match the pattern
102102
const markMatchedStatusChecks = () => {
103103
const patterns = (document.querySelector<HTMLTextAreaElement>('#status_check_contexts').value || '').split(/[\r\n]+/);
104-
const validPatterns = patterns.map((item) => item.trim()).filter(Boolean);
104+
const validPatterns = patterns.map((item) => item.trim()).filter(Boolean as unknown as <T>(x: T | boolean) => x is T);
105105
const marks = document.querySelectorAll('.status-check-matched-mark');
106106

107107
for (const el of marks) {

web_src/js/svg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export function svg(name: SvgName, size = 16, classNames?: string | string[]): s
181181
svgNode.setAttribute('width', String(size));
182182
svgNode.setAttribute('height', String(size));
183183
}
184-
if (className) svgNode.classList.add(...className.split(/\s+/).filter(Boolean));
184+
if (className) svgNode.classList.add(...className.split(/\s+/).filter(Boolean as unknown as <T>(x: T | boolean) => x is T));
185185
return serializeXml(svgNode);
186186
}
187187

0 commit comments

Comments
 (0)