Fix No Phone Number scenario
Fix: In the scenario where a phone number is not able to be read from the SIM, QuecManager will now continue to provide other stats. Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
This commit is contained in:
@@ -247,8 +247,13 @@ function processSimData(jsonData) {
|
||||
setText("simSlot", simSlot);
|
||||
|
||||
// Phone Number
|
||||
const phoneNumber = extractValue(phoneResponse.response).split(",")[1].replace(/"/g, "").trim();
|
||||
setText("phoneNumber", phoneNumber);
|
||||
// If trim is an error, return no phone number
|
||||
try {
|
||||
const phoneNumber = extractValue(phoneResponse.response).split(",")[1].replace(/"/g, "").trim();
|
||||
setText("phoneNumber", phoneNumber);
|
||||
} catch (error) {
|
||||
setText("phoneNumber", "-");
|
||||
}
|
||||
|
||||
// SIM Provider and Access Technology
|
||||
const providerData = extractValue(providerResponse.response).split(",");
|
||||
|
||||
Reference in New Issue
Block a user