nativescript-nfc-uid
Advanced tools
Comparing version 4.1.0 to 4.1.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var nfc_common_1 = require("./nfc.common"); | ||
var core_1 = require("@nativescript/core"); | ||
var Nfc = /** @class */ (function () { | ||
@@ -36,3 +37,3 @@ function Nfc() { | ||
if (!Nfc._available()) { | ||
reject(); | ||
reject("NFC Not available!"); | ||
return; | ||
@@ -43,3 +44,3 @@ } | ||
_this.invalidateSession(); | ||
resolve(); | ||
resolve("No callback found"); | ||
return; | ||
@@ -59,3 +60,3 @@ } | ||
_this.tagSession.beginSession(); | ||
resolve(); | ||
resolve("Begin session..."); | ||
} | ||
@@ -72,3 +73,3 @@ catch (e) { | ||
if (!Nfc._available()) { | ||
reject(); | ||
reject("NFC not available"); | ||
return; | ||
@@ -78,3 +79,3 @@ } | ||
_this.invalidateSession(); | ||
resolve(); | ||
resolve("No callback found!"); | ||
return; | ||
@@ -89,3 +90,6 @@ } | ||
// execute on the main thread with this trick, so UI updates are not broken | ||
Promise.resolve().then(function () { return callback(data); }); | ||
// Promise.resolve().then(() => callback(data)); | ||
core_1.Utils.mainThreadify(function () { | ||
callback(data); | ||
}); | ||
} | ||
@@ -98,3 +102,3 @@ }, options); | ||
_this.session.beginSession(); | ||
resolve(); | ||
resolve("Begin session..."); | ||
} | ||
@@ -101,0 +105,0 @@ catch (e) { |
{ | ||
"name": "nativescript-nfc-uid", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "NFC plugin for your NativeScript app", | ||
@@ -5,0 +5,0 @@ "main": "nfc", |
70711
1110