Skip to content

Commit cf64111

Browse files
fix: catch UnknownJSTypeError for node and chrome platform.
1 parent bbd8569 commit cf64111

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/src/platform_check/web.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class PlatformWeb extends Platform {
1616
try {
1717
Random.secure();
1818
useBuiltInRng = true;
19-
} on UnsupportedError {
19+
} catch (_) {
20+
// throws UnknownJsTypeError. See 'dart:_js_types'.
2021
useBuiltInRng = false;
2122
}
2223
}

0 commit comments

Comments
 (0)