remove iter use from getLegacyGlobalDiForExtensionApi

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-05-05 08:49:10 -04:00
1 parent f71f9e9f8f
commit 2a8ca21fc9
1 file changed
+1 -2
@@ -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.");