Skip to content

Commit 367d3fa

Browse files
authored
Merge pull request #699 from lei-xiaoming/master
Modify app launch error
2 parents 3611f41 + d02eb30 commit 367d3fa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

www/bluetoothle.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var bluetoothleName = "BluetoothLePlugin";
23
var bluetoothle = {
34
_newReorderer: function(successCallback) {
@@ -15,7 +16,7 @@ var bluetoothle = {
1516
*/
1617
if (sequence == null) {
1718
this.callback(obj);
18-
return;
19+
return;
1920
}
2021

2122
if (sequence != this.nextExpected) console.warn("Received out of order: expected " + this.nextExpected +" got " + sequence);
@@ -49,7 +50,7 @@ var bluetoothle = {
4950
},
5051
getAdapterInfo: function(successCallback) {
5152
cordova.exec(successCallback, successCallback, bluetoothleName, "getAdapterInfo", []);
52-
},
53+
},
5354
startScan: function(successCallback, errorCallback, params) {
5455
cordova.exec(successCallback, errorCallback, bluetoothleName, "startScan", [params]);
5556
},
@@ -209,13 +210,13 @@ var bluetoothle = {
209210
return String.fromCharCode.apply(null, new Uint16Array(bytes));
210211
},
211212
encodeUnicode: function(str) {
212-
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {
213+
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
213214
return String.fromCharCode(parseInt(p1, 16))
214215
}))
215216
},
216217
decodeUnicode: function(str) {
217218
// Going backwards: from byte stream, to percent-encoding, to original string.
218-
return decodeURIComponent(atob(str).split('').map((c) => {
219+
return decodeURIComponent(atob(str).split('').map(function(c) {
219220
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
220221
}).join(''));
221222
},

0 commit comments

Comments
 (0)