tsc:allowUnreachableCode, eslint:no-unreachable, assert->assertDev

This commit is contained in:
Jamie Kyle 2022-09-15 12:17:15 -07:00 committed by GitHub
parent f627a05cf8
commit eb10aafd7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 213 additions and 176 deletions

View file

@ -10,7 +10,7 @@ import { getIntl } from '../selectors/user';
import * as log from '../../logging/log';
import type { Loadable } from '../../util/loadable';
import { LoadingState } from '../../util/loadable';
import { assert } from '../../util/assert';
import { assertDev } from '../../util/assert';
import { explodePromise } from '../../util/explodePromise';
import { missingCaseError } from '../../util/missingCaseError';
import {
@ -134,7 +134,7 @@ export function SmartInstallScreen(): ReactElement {
let deviceName: string = normalizeDeviceName(state.deviceName);
if (!deviceName.length) {
// This should be impossible, but we have it here just in case.
assert(
assertDev(
false,
'Unexpected empty device name. Falling back to placeholder value'
);
@ -149,7 +149,7 @@ export function SmartInstallScreen(): ReactElement {
let hasCleanedUp = false;
const accountManager = window.getAccountManager();
assert(accountManager, 'Expected an account manager');
assertDev(accountManager, 'Expected an account manager');
const updateProvisioningUrl = (value: string): void => {
if (hasCleanedUp) {