Skip to content

Commit bceb281

Browse files
authored
Setting fallback value for nullable timeout
1 parent c96c567 commit bceb281

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/javascript_runtime.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ abstract class JavascriptRuntime {
135135
//print('SET TIMEOUT EVAL RESULT: $setTImeoutResult');
136136
onMessage('SetTimeout', (dynamic args) {
137137
try {
138-
int duration = args['timeout'];
138+
int duration = args['timeout'] ?? 0;
139139
String idx = args['timeoutIndex'];
140140

141141
Timer(Duration(milliseconds: duration), () {

0 commit comments

Comments
 (0)