File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ library nodecrypto;
33
44import 'dart:js_interop' ;
55
6+ const bool isWASM = bool .fromEnvironment ('dart.tool.dart2wasm' );
7+
68@JS ()
79@staticInterop
810class Process {}
@@ -22,7 +24,7 @@ extension on Versions {
2224 external JSAny get node;
2325}
2426
25- bool get isNodeJS => _process? .versions? .node != null ;
27+ bool get isNodeDart2JS => _process? .versions? .node != null && ! isWASM ;
2628
2729@JS ()
2830@staticInterop
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import 'platform_check.dart';
1010
1111class PlatformWeb extends Platform {
1212 static final PlatformWeb instance = PlatformWeb ();
13- static bool useBuiltInRng = ! isNodeJS ;
13+ static bool useBuiltInRng = ! isNodeDart2JS ;
1414
1515 const PlatformWeb ();
1616
You can’t perform that action at this time.
0 commit comments