From acae2c7d051ec73ade46de1fbefe13c4f1b4a2d2 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 --- 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.11.0