Skip to content

Commit 8f00c41

Browse files
committed
fix(src): Fix get arguments in addLoc and parse
1 parent 52b5694 commit 8f00c41

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ const getLoc = (mcc, mnc, lac, cid) => {
4141
});
4242
};
4343

44-
const addLoc = (data, options = {}) => {
44+
const addLoc = (data, options) => {
4545
return new Promise((resolve) => {
46+
options = options || {};
4647
data.gps = data.loc ? 'enable' : 'disable';
4748
if (data.gps === 'enable') return resolve(data);
4849
const mcc = options.mcc || 730;
@@ -68,8 +69,9 @@ const addAddress = data => {
6869
});
6970
};
7071

71-
const parse = (raw, options = {}) => {
72+
const parse = (raw, options) => {
7273
return new Promise((resolve, reject) => {
74+
options = options || {};
7375
let data = {raw: raw.toString()};
7476
if (tz.isTz(raw)) {
7577
data = tz.parse(raw);

0 commit comments

Comments
 (0)