JAL-3446 reorganized JalviewJSApp (accidentally put that in jalview/api)
[jalview.git] / src / jalview / bin / ArgsParser.java
index 55e760f..c5c08f6 100644 (file)
@@ -118,14 +118,15 @@ public class ArgsParser
     {
       appletParams = AppletParams.getAppletParams(args, vargs);
     }
-    else if (Platform.isJS() && args.length == 0)
-    {
-      isApplet = true;
-      appletParams = AppletParams
-              .getAppletParams(Platform.getAppletInfoAsMap(), vargs);
-    }
     else
     {
+      if (Platform.isJS())
+
+      {
+        isApplet = true;
+        appletParams = AppletParams
+                .getAppletParams(Platform.getAppletInfoAsMap(), vargs);
+      }
       for (int i = 0; i < args.length; i++)
       {
         String arg = args[i].trim();
@@ -207,7 +208,7 @@ public class ArgsParser
     Object value;
     return (appletParams == null ? null
             : (value = appletParams.get(key.toLowerCase())) == null
-                    ? def : asString ? value.toString()
+                    ? def : asString ? "" + value
                     : value);
   }