Skip to content

Commit ea09b0d

Browse files
committed
comment out all console logs and dumps
1 parent ba70358 commit ea09b0d

5 files changed

+35
-17
lines changed

contact-helper.android.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ exports.addImageSources = function (message) {
3939
}
4040
}
4141
});
42-
} catch(e) { console.log(e); }
42+
} catch(e) {
43+
// console.log(e);
44+
}
4345
return message;
4446
};
4547

get-all-contacts-worker.android.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ self.onmessage = function (event) {
2828
postMessage({ type: 'result', message: { data: null, response: "fetch" }})
2929
}
3030
} catch (e) {
31-
console.log('error', e)
31+
// console.log('error', e)
3232
postMessage({ type: 'result', message: e });
3333
}
3434
}

getAllContacts.android.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module.exports = function (contactFields) {
4949
}
5050
}
5151
} catch (e) {
52-
console.log('error', e)
52+
// console.log('error', e)
5353
return {
5454
data: null,
5555
response: "fetch"

index.android.js

+15-7
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,12 @@ exports.getContactsByName = function (searchPredicate,contactFields) {
8282
}
8383
worker.postMessage({ "searchPredicate": searchPredicate, "contactFields" : contactFields });
8484
worker.onmessage = (function (event) {
85-
if (event.data.type == 'debug') { console.log(event.data.message); }
86-
else if (event.data.type == 'dump') { console.dump(event.data.message); }
85+
if (event.data.type == 'debug') {
86+
// console.log(event.data.message);
87+
}
88+
else if (event.data.type == 'dump') {
89+
// console.dump(event.data.message);
90+
}
8791
else if (event.data.type == 'result') {
8892
worker.terminate();
8993
// add nativescript image-source object to photo property since it does not work inside web worker
@@ -92,7 +96,7 @@ exports.getContactsByName = function (searchPredicate,contactFields) {
9296
}
9397
});
9498
worker.onerror = (function (e) {
95-
console.dump(e);
99+
// console.dump(e);
96100
});
97101
});
98102
};
@@ -102,8 +106,12 @@ exports.getAllContacts = function (contactFields) {
102106
var worker = new Worker('./get-all-contacts-worker.js'); // relative for caller script path
103107
worker.postMessage({ "contactFields" : contactFields });
104108
worker.onmessage = (function (event) {
105-
if (event.data.type == 'debug') { console.log(event.data.message); }
106-
else if (event.data.type == 'dump') { console.dump(event.data.message); }
109+
if (event.data.type == 'debug') {
110+
// console.log(event.data.message);
111+
}
112+
else if (event.data.type == 'dump') {
113+
// console.dump(event.data.message);
114+
}
107115
else if (event.data.type == 'result') {
108116
worker.terminate();
109117

@@ -116,7 +124,7 @@ exports.getAllContacts = function (contactFields) {
116124
_contacts.push(contactModel)
117125
})
118126
} catch(e){
119-
console.dump(e)
127+
// console.dump(e)
120128
}
121129
event.data.message.data = _contacts
122130

@@ -126,7 +134,7 @@ exports.getAllContacts = function (contactFields) {
126134
}
127135
});
128136
worker.onerror = (function (e) {
129-
console.dump(e);
137+
// console.dump(e);
130138
});
131139
});
132140
};

index.ios.js

+15-7
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,20 @@ exports.getContactsByName = function(searchPredicate,contactFields){
6161
}
6262
worker.postMessage({ "searchPredicate": searchPredicate, "contactFields" : contactFields });
6363
worker.onmessage = function (event) {
64-
if (event.data.type == 'debug') { console.log(event.data.message); }
65-
else if (event.data.type == 'dump') { console.dump(event.data.message); }
64+
if (event.data.type == 'debug') {
65+
// console.log(event.data.message);
66+
}
67+
else if (event.data.type == 'dump') {
68+
// console.dump(event.data.message);
69+
}
6670
else if (event.data.type == 'error') { reject(event.data.message); }
6771
else {
6872
worker.terminate();
6973
resolve(event.data.message);
7074
}
7175
};
7276
worker.onerror = function (e) {
73-
console.dump(e);
77+
// console.dump(e);
7478
};
7579
});
7680
};
@@ -87,19 +91,23 @@ exports.getAllContacts = function(contactFields) {
8791
_contacts.push(contactModel)
8892
})
8993
} catch(e){
90-
console.dump(e)
94+
// console.dump(e)
9195
}
9296
event.data.message.data = _contacts
93-
if (event.data.type == 'debug') { console.log(event.data.message); }
94-
else if (event.data.type == 'dump') { console.dump(event.data.message); }
97+
if (event.data.type == 'debug') {
98+
// console.log(event.data.message);
99+
}
100+
else if (event.data.type == 'dump') {
101+
// console.dump(event.data.message);
102+
}
95103
else if (event.data.type == 'error') { reject(event.data.message); }
96104
else {
97105
worker.terminate();
98106
resolve(event.data.message);
99107
}
100108
};
101109
worker.onerror = function (e) {
102-
console.dump(e);
110+
// console.dump(e);
103111
};
104112
});
105113
};

0 commit comments

Comments
 (0)