refactor(metadata-accessor): remove comment & use short checking

This commit is contained in:
Morb0 2021-01-06 19:38:58 +03:00
parent 4ada932d4e
commit 1b8aa4ac55

View File

@ -12,17 +12,12 @@ export class MetadataAccessorService {
constructor(private readonly reflector: Reflector) {} constructor(private readonly reflector: Reflector) {}
isUpdate(target: Function): boolean { isUpdate(target: Function): boolean {
// TODO: We really need this check? if (!target) return false;
if (!target) {
return false;
}
return !!this.reflector.get(UPDATE_METADATA, target); return !!this.reflector.get(UPDATE_METADATA, target);
} }
isScene(target: Function): boolean { isScene(target: Function): boolean {
if (!target) { if (!target) return false;
return false;
}
return !!this.reflector.get(SCENE_METADATA, target); return !!this.reflector.get(SCENE_METADATA, target);
} }