error fix in web

This commit is contained in:
Toki 2025-02-01 19:09:47 +09:00
parent 4bea5870f3
commit df97d4117a

View file

@ -4,7 +4,7 @@ import 'package:dart_framework/log/log.dart';
import 'package:dart_framework/utils/system_util.dart' as system;
class Application {
late Function(Object, StackTrace) writeLog;
Function(Object, StackTrace)? writeLog;
Application(String name, String appID, Function() func,
Function(Object, StackTrace) errorListener) {
@ -13,7 +13,7 @@ class Application {
writeLog = (error, stack) => logError('$error:\n$stack');
func();
}, (error, stack) {
writeLog(error, stack);
writeLog??(error, stack);
errorListener(error, stack);
});
}