radgrad/radgrad2

View on GitHub
archive/issue-412/teaser.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Teasers } from '../../app/imports/api/teaser/TeaserCollection';

export const teaser = (theOpp: { slugID: string }): unknown => {
  if (Teasers.isDefined({ targetSlugID: theOpp.slugID })) {
    return Teasers.findDoc({ targetSlugID: theOpp.slugID });
  }
  return {};
};