Selaa lähdekoodia

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

master
paweldomas 8 vuotta sitten
vanhempi
commit
f71aee97f8
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2
    1
      modules/xmpp/strophe.util.js

+ 2
- 1
modules/xmpp/strophe.util.js Näytä tiedosto

@@ -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…
Peruuta
Tallenna