You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2016/10/21 10:58:26 UTC

cordova-windows git commit: CB-12036 Fix setSplashBgColor exception when no splashscreen is found

Repository: cordova-windows
Updated Branches:
  refs/heads/master bf9a49ae4 -> c3b109c93


CB-12036 Fix setSplashBgColor exception when no splashscreen is found

WindowsPhone allows to unset splashscreen (img) to avoid it to be shown.
This patch fixes whenever the "splashscreen" node is not present.

This closes #196


Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/c3b109c9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/c3b109c9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/c3b109c9

Branch: refs/heads/master
Commit: c3b109c937cd75ad3b35df1ec0dde753b1b13e59
Parents: bf9a49a
Author: giuseppelt <gi...@users.noreply.github.com>
Authored: Wed Sep 14 18:06:25 2016 +0200
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Fri Oct 21 13:49:49 2016 +0300

----------------------------------------------------------------------
 template/cordova/lib/AppxManifest.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/c3b109c9/template/cordova/lib/AppxManifest.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/AppxManifest.js b/template/cordova/lib/AppxManifest.js
index 75d4eee..8ad7045 100644
--- a/template/cordova/lib/AppxManifest.js
+++ b/template/cordova/lib/AppxManifest.js
@@ -407,10 +407,12 @@ AppxManifest.prototype.getVisualElements = function () {
         },
         setSplashBackgroundColor: function (color) {
             var splashNode = visualElements.find('./' + self.prefix + 'SplashScreen');
-            if (color && splashNode) {
-                splashNode.attrib.BackgroundColor = refineColor(color);
-            } else if (!color) {
-                delete splashNode.attrib.BackgroundColor;
+            if (splashNode) {
+                if (color) {
+                    splashNode.attrib.BackgroundColor = refineColor(color);
+                } else {
+                    delete splashNode.attrib.BackgroundColor;
+                }
             }
             return this;
         },


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org