diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js index 534f3b347e66..92df155b4c3d 100644 --- a/dom/system/gonk/ril_worker.js +++ b/dom/system/gonk/ril_worker.js @@ -8742,10 +8742,12 @@ let ICCIOHelper = { // description. let errorMsg = "ICC I/O Error code " + RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError] + - "EF id = " + options.fileId.toString(16) + - " command = " + options.command.toString(16) + - "(" + options.sw1.toString(16) + - "/" + options.sw2.toString(16) + ")"; + " EF id = " + options.fileId.toString(16) + + " command = " + options.command.toString(16); + if (options.sw1 && options.sw2) { + errorMsg += "(" + options.sw1.toString(16) + + "/" + options.sw2.toString(16) + ")"; + } error(errorMsg); }, };