We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac15fa0 commit c3d5f9eCopy full SHA for c3d5f9e
backend/src/models/shortsqueeze/shortsqueeze.service.ts
@@ -14,8 +14,11 @@ export class ShortsqueezeService {
14
return this.squeezeRepository.set(stockTicker, data);
15
}
16
17
- async fetch(stockTicker: string): Promise<IShortsqueeze> {
+ async fetch(stockTicker: string): Promise<IShortsqueeze | null> {
18
const squeeze = await shortsqueeze(stockTicker);
19
+ if (!squeeze) {
20
+ return null;
21
+ }
22
23
return {
24
shortFlow: squeeze ? squeeze.shortPercentOfFloat : undefined,
0 commit comments