We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 35773a1 + 8f27770 commit 2732ac3Copy full SHA for 2732ac3
6 files changed
lib/index.ts
@@ -10,7 +10,7 @@
10
* @throws if the key can't be found
11
*/
12
export function loadState<T>(app: string, key: string, fallback?: T): T {
13
- const elem = <HTMLInputElement>document.querySelector(`#initial-state-${app}-${key}`)
+ const elem = document.querySelector<HTMLInputElement>(`#initial-state-${app}-${key}`)
14
if (elem === null) {
15
if (fallback !== undefined) {
16
return fallback
0 commit comments