Skip to content
Permalink
Browse files

Update SpinnerDialogProxy.js

Fix to prevent startup error: `Exception calling native with command :: SpinnerDialog :: hide ::exception=TypeError: Unable to get property 'hideAsync' of undefined or null reference` on Windows Phone 8.1 devices with UWP.
  • Loading branch information...
andreszs committed Jul 29, 2018
1 parent 32a20a8 commit 40f078dd1e9008e513fe68f867e88eacb33e8c51
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/windows/SpinnerDialogProxy.js
@@ -30,7 +30,11 @@ cordova.commandProxy.add("SpinnerDialog", {
typeof Windows.UI !== 'undefined' /* Check that we have a UI to work with */ &&
typeof Windows.UI.ViewManagement.StatusBar !== 'undefined' /* Check that we have the StatusBar to work with*/) {

progressIndicator.hideAsync();
try {
progressIndicator.hideAsync();
} catch(e) {
console.warn(e.message);
}
/* Hide status bar if data is undefined or false exclusively */
if(typeof(data[0]) === 'undefined' || data[0] === false) {
Windows.UI.ViewManagement.StatusBar.getForCurrentView().hideAsync();

0 comments on commit 40f078d

Please sign in to comment.
You can’t perform that action at this time.