From 5afde1c62f27c86b9e28ed44f237b075198ad831 Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Tue, 10 Mar 2015 15:03:39 -0700 Subject: [PATCH] [wp8] oops, Added back config parse result checks --- src/wp/SplashScreen.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp/SplashScreen.cs b/src/wp/SplashScreen.cs index e8ef4c0..feb4038 100644 --- a/src/wp/SplashScreen.cs +++ b/src/wp/SplashScreen.cs @@ -109,14 +109,16 @@ namespace WPCordovaClassLib.Cordova.Commands .Where(x => (string)x.Attribute("name") == "AutoHideSplashScreen") .Select(x => (string)x.Attribute("value")) .FirstOrDefault(); - bool.TryParse(configAutoHide, out prefAutoHide); + bool bVal; + prefAutoHide = bool.TryParse(configAutoHide, out bVal) ? bVal : prefAutoHide; string configDelay = configFile.Descendants() .Where(x => (string)x.Attribute("name") == "SplashScreenDelay") .Select(x => (string)x.Attribute("value")) .FirstOrDefault(); - int.TryParse(configDelay, out prefDelay); + int nVal; + prefDelay = int.TryParse(configDelay, out nVal) ? nVal : prefDelay; string configImage = configFile.Descendants() .Where(x => (string)x.Attribute("name") == "SplashScreen")