Skip to content

Commit ea4967a

Browse files
committed
Suppress lint
1 parent 17b6bc5 commit ea4967a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/firestore/src/platform_browser/browser_platform.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { ConnectivityMonitor } from './../remote/connectivity_monitor';
2424
import { NoopConnectivityMonitor } from '../remote/connectivity_monitor_noop';
2525
import { BrowserConnectivityMonitor } from './browser_connectivity_monitor';
2626
import { WebChannelConnection } from './webchannel_connection';
27-
import { validatePositiveNumber } from '../util/input_validation';
27+
import { debugAssert } from '../util/assert';
2828

2929
// Implements the Platform API for browsers and some browser-like environments
3030
// (including ReactNative).
@@ -76,10 +76,11 @@ export class BrowserPlatform implements Platform {
7676
}
7777

7878
randomBytes(nBytes: number): Uint8Array {
79-
validatePositiveNumber('randomBytes', 1, nBytes);
79+
debugAssert(nBytes >= 0, 'Number of random bytes must not be negative');
8080

8181
// Polyfill for IE and WebWorker
8282
const crypto =
83+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
8384
typeof self !== 'undefined' && (self.crypto || (self as any)['msCrypto']);
8485
const v = new Uint8Array(nBytes);
8586
if (crypto) {

0 commit comments

Comments
 (0)