chore: enforce brackets for if clause and for/while loops
This commit is contained in:
@@ -26,7 +26,9 @@ class MockIntersectionObserver implements IntersectionObserver {
|
||||
|
||||
constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit) {
|
||||
this.callbacks.push(callback);
|
||||
if (options?.rootMargin) this.rootMargin = options.rootMargin;
|
||||
if (options?.rootMargin) {
|
||||
this.rootMargin = options.rootMargin;
|
||||
}
|
||||
if (options?.threshold) {
|
||||
this.thresholds = Array.isArray(options.threshold) ? options.threshold : [options.threshold];
|
||||
}
|
||||
@@ -120,7 +122,9 @@ describe('ScrollBreadcrumbsStore', () => {
|
||||
(event: string, listener: EventListenerOrEventListenerObject) => {
|
||||
if (event === 'scroll') {
|
||||
const index = scrollListeners.indexOf(listener as () => void);
|
||||
if (index > -1) scrollListeners.splice(index, 1);
|
||||
if (index > -1) {
|
||||
scrollListeners.splice(index, 1);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user