Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getSelf(context: unknown): UpdatableRootReference {
if (!this.self) {
this.self = new UpdatableRootReference(context);
}
return this.self;
}
function getSelf(obj: EmberishGlimmerComponent): UpdatableRootReference {
if (SELF_REF.has(obj)) {
return SELF_REF.get(obj)!;
} else {
let ref = new UpdatableRootReference(obj);
SELF_REF.set(obj, ref);
return ref;
}
}
getSelf(component: BasicComponent): VersionedPathReference {
return new UpdatableRootReference(component);
}