From c65c6d9f91c5372360619004c8602d2a262dfb8b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 10 Jul 2014 11:29:49 -0400 Subject: [PATCH] LP#1268619: JS status codes can come across as numbers; stringify for match Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- src/javascript/opensrf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/javascript/opensrf.js b/src/javascript/opensrf.js index a31c550..29cf6bf 100644 --- a/src/javascript/opensrf.js +++ b/src/javascript/opensrf.js @@ -633,7 +633,7 @@ OpenSRF.Stack.handle_message = function(ses, osrf_msg) { } // capture all 400's and 500's as method errors - if (status.match(/^4/) || status.match(/^5/)) { + if ((status+'').match(/^4/) || (status+'').match(/^5/)) { if(req && req.onmethoderror) return req.onmethoderror(req, status, status_text); } -- 2.43.2