cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an-s...@apache.org
Subject cordova-windows git commit: CB-12036 Fix setSplashBgColor exception when no splashscreen is found
Date Fri, 21 Oct 2016 10:58:26 GMT
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 <giuseppelt@users.noreply.github.com>
Authored: Wed Sep 14 18:06:25 2016 +0200
Committer: Vladimir Kotikov <v-vlkoti@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


Mime
View raw message