mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
remove iter use from getLegacyGlobalDiForExtensionApi
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
f71f9e9f8f
commit
2a8ca21fc9
@ -3,7 +3,6 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { DiContainer } from "@ogre-tools/injectable";
|
||||
import { iter } from "../../common/utils";
|
||||
|
||||
const legacyGlobalDis = new Map<Environments, DiContainer>();
|
||||
|
||||
@ -24,7 +23,7 @@ export const getLegacyGlobalDiForExtensionApi = () => {
|
||||
throw new Error("Tried to get DI container using legacy globals where there is multiple containers available.");
|
||||
}
|
||||
|
||||
const di = iter.first(legacyGlobalDis.values());
|
||||
const [di] = [...legacyGlobalDis.values()];
|
||||
|
||||
if (!di) {
|
||||
throw new Error("Tried to get DI container using legacy globals where there is no containers available.");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user