Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
deebloo committed Jan 14, 2025
1 parent f55e310 commit dc41d8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/di/src/lib/injectable-el.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
(Symbol as any).metadata ??= Symbol("Symbol.metadata");

import { INJECTOR_CTX } from "./context/injector.js";
import { ContextRequestEvent } from "./context/protocol.js";
import { injectables } from "./injector.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/di/src/lib/injectable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function injectable(opts?: InjectableOpts) {
// Only apply custom element bootstrap logic if the decorated class is an HTMLElement
if ("HTMLElement" in globalThis) {
if (
HTMLElement.prototype.isPrototypeOf.call(
Object.prototype.isPrototypeOf.call(
HTMLElement.prototype,
Base.prototype,
)
Expand Down
2 changes: 1 addition & 1 deletion packages/di/src/lib/injector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ it("should create an instance from a StaticToken factory", () => {
});

it("should create an instance from an async StaticToken factory", async () => {
const TOKEN = new StaticToken("test", () => Promise.resolve("Hello World"));
const TOKEN = new StaticToken("test", async () => "Hello World");
const injector = new Injector();

const res = await injector.inject(TOKEN);
Expand Down

0 comments on commit dc41d8d

Please sign in to comment.