Skip to content

Commit

Permalink
Error Fix
Browse files Browse the repository at this point in the history
my brother forgot to add '!' in the check, lint was fine all tests are working
  • Loading branch information
Ali Rıza Kat committed Nov 8, 2024
1 parent 2861fc5 commit 9d03126
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/countly.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ Countly.Bulk = Bulk;
* */
Countly.set_id = function(newId) {
cc.log(cc.logLevelEnums.INFO, `set_id, Changing the device ID to: [${newId}]`);
if (newId === null || newId === undefined || typeof newId === "string" || newId === "") {
cc.log(cc.logLevelEnums.WARNING, "set_id, The provided device is not a valid ID");
if (newId === null || newId === undefined || newId === "" || typeof newId !== "string") {
cc.log(cc.logLevelEnums.WARNING, "set_id, The provided id is not a valid ID");
return;
}
if (Countly.get_device_id_type() === cc.deviceIdTypeEnums.DEVELOPER_SUPPLIED) {
Expand Down

0 comments on commit 9d03126

Please sign in to comment.