Commit d972f1d7 authored by martin hou's avatar martin hou

fix: 增加空指针判断

parent 0d527775
......@@ -156,7 +156,7 @@ function Jensen(log, conn) {
} catch (e) {
let err = String(e);
Logger.error('jensen', 'setup', err);
if (err.indexOf('Unable to claim interface.') > -1) self?.onerror(e);
if (err.indexOf('Unable to claim interface.') > -1 && typeof(self?.onerror) == 'function') self?.onerror(e);
}
if (!disableOnConnect) _check_conn_status();
current = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment