Skip to content

Commit

Permalink
fix(): Use ES5 syntax to support older android versions (5.1 and lower)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiddler authored and Juan Miguel Besada Vidal committed Apr 6, 2018
1 parent 823e704 commit 3107b6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions www/universal_links.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ var universalLinks = {
* Bind Event Listeners
*/
bindEvents: function() {
const _this = this;
document.addEventListener('deviceready', () => {
var _this = this;
document.addEventListener('deviceready', function() {
_this.onDeviceReady();
}, false);
},
Expand All @@ -44,8 +44,8 @@ var universalLinks = {
* deviceready Event Handler
*/
onDeviceReady: function() {
const _this = this;
this.subscribe(_this.eventName, (event) => {
var _this = this;
this.subscribe(_this.eventName, function(event) {
_this.didLaunchAppFromLink(event);
});
},
Expand Down Expand Up @@ -79,14 +79,14 @@ var universalLinks = {
*
* @param {number} milliseconds - Optional. The number of milliseconds to wait before executing the code. If omitted, the value 0 is used
*/
checkDeepLink: function (milliseconds = 2000) {
checkDeepLink: function (milliseconds) {
var _this = this;
return new Promise(function (resolve, reject) {
setTimeout(function () {
if (_this.dpLink)
_this.validateDeeplink()
resolve(_this.dpLink);
}, milliseconds);
}, milliseconds || 0);
});
},

Expand Down

0 comments on commit 3107b6e

Please sign in to comment.