Skip to content

Commit 0cef707

Browse files
committed
Remove useless type assertion
1 parent 10fdb15 commit 0cef707

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/permission/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const createPermission = (
1818
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1919
if (navigator) {
2020
navigator.permissions
21-
.query(typeof name === "string" ? { name: name as PermissionName } : name)
21+
.query(typeof name === "string" ? { name } : name)
2222
.then(setStatus)
2323
.catch(error => {
2424
if (error.name !== "TypeError" || (name !== "microphone" && name !== "camera")) {

0 commit comments

Comments
 (0)