tsc:allowUnreachableCode, eslint:no-unreachable, assert->assertDev
This commit is contained in:
parent
f627a05cf8
commit
eb10aafd7c
57 changed files with 213 additions and 176 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import { assert } from '../../util/assert';
|
||||
import { assertDev } from '../../util/assert';
|
||||
import { getDomain } from '../../types/LinkPreview';
|
||||
|
||||
import type { LinkPreviewSourceType } from '../../types/LinkPreview';
|
||||
|
@ -22,7 +22,10 @@ export const getLinkPreview = createSelector(
|
|||
}
|
||||
|
||||
const domain = getDomain(linkPreview.url);
|
||||
assert(domain !== undefined, "Domain of linkPreview can't be undefined");
|
||||
assertDev(
|
||||
domain !== undefined,
|
||||
"Domain of linkPreview can't be undefined"
|
||||
);
|
||||
|
||||
return {
|
||||
...linkPreview,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue