Merge pull request #2781 from johnwang71/flow-undefined-474

Fix bug: Crash & quit while handling exception with undefine msg.error
This commit is contained in:
Nick O'Leary 2020-12-15 13:37:07 +00:00 committed by GitHub
commit 02510efda1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -470,8 +470,8 @@ class Flow {
}
// console.log("HE",logMessage);
var count = 1;
if (msg && msg.hasOwnProperty("error") && msg.error !== null) {
if (msg.error.hasOwnProperty("source") && msg.error.source !== null) {
if (msg && msg.hasOwnProperty("error") && msg.error) {
if (msg.error.hasOwnProperty("source") && msg.error.source) {
if (msg.error.source.id === node.id) {
count = msg.error.source.count+1;
if (count === 10) {