From afb434cd033a085cf7b226b0d6f8d84f326813d6 Mon Sep 17 00:00:00 2001
From: Florent <cheap.glitch@gmail.com>
Date: Fri, 18 Mar 2022 11:36:42 +0100
Subject: Meta: Correctly deinit all features (#5422)

Co-authored-by: Federico Brigante <me@fregante.com>
---
 source/features/clean-repo-filelist-actions.tsx | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'source/features/clean-repo-filelist-actions.tsx')

diff --git a/source/features/clean-repo-filelist-actions.tsx b/source/features/clean-repo-filelist-actions.tsx
index c8a3881c..9105826f 100644
--- a/source/features/clean-repo-filelist-actions.tsx
+++ b/source/features/clean-repo-filelist-actions.tsx
@@ -1,6 +1,5 @@
 import React from 'dom-chef';
 import select from 'select-dom';
-import onetime from 'onetime';
 import {observe} from 'selector-observer';
 import * as pageDetect from 'github-url-detection';
 import {PlusIcon, SearchIcon, CodeIcon} from '@primer/octicons-react';
@@ -16,9 +15,9 @@ function addTooltipToSummary(childElement: Element, tooltip: string): void {
 	);
 }
 
-function init(): void {
+function init(): Deinit {
 	// `.btn` selects the desktop version
-	observe('.btn[data-hotkey="t"]:not(.rgh-repo-filelist-actions)', {
+	return observe('.btn[data-hotkey="t"]:not(.rgh-repo-filelist-actions)', {
 		add(searchButton) {
 			searchButton.classList.add('tooltipped', 'tooltipped-ne', 'rgh-repo-filelist-actions');
 			searchButton.setAttribute('aria-label', 'Go to file');
@@ -61,5 +60,5 @@ void features.add(import.meta.url, {
 		pageDetect.isSingleFile,
 	],
 	deduplicate: 'has-rgh-inner',
-	init: onetime(init),
+	init,
 });
-- 
cgit v1.2.3

