Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Consider adopting the Disposable pattern in inject functions #777

@chrismwendt

Description

@chrismwendt

The root cause of sourcegraph/browser-extensions#178 was that no marker was checked before mounting the command palette. If that function was supposed to return a Disposable, there's a higher chance that teardown logic would have been implemented.

This code looks pretty fragile, and could be made more robust with Disposables

https://github.com/sourcegraph/browser-extensions/blob/ff75251654fdbb7d611d3488d7fef6ccc6d6bcab/src/libs/github/inject.tsx#L96-L112

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions