Browse Source

fix(strophe.util.js): do not test RegExpr if not needed

master
paweldomas 8 years ago
parent
commit
f71aee97f8
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      modules/xmpp/strophe.util.js

+ 2
- 1
modules/xmpp/strophe.util.js View File

@@ -59,7 +59,8 @@ export default function () {
59 59
             case Strophe.LogLevel.DEBUG:
60 60
                 // The log message which reports successful status is logged
61 61
                 // on Strophe's DEBUG level
62
-                if (resetLastErrorStatusRegExpr.test(msg)) {
62
+                if (lastErrorStatus !== -1 &&
63
+                        resetLastErrorStatusRegExpr.test(msg)) {
63 64
                     logger.debug("Reset lastErrorStatus");
64 65
                     lastErrorStatus = -1;
65 66
                 }

Loading…
Cancel
Save