File tree Expand file tree Collapse file tree
flow-server/src/main/java/com/vaadin/flow/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,13 +43,15 @@ public class WebBrowser implements Serializable {
4343 private BrowserDetails browserDetails = null ;
4444
4545 /**
46- * For internal use only. Configures all properties for the initial empty state.
46+ * For internal use only. Configures all properties for the initial empty
47+ * state.
4748 */
48- protected WebBrowser () {}
49+ protected WebBrowser () {
50+ }
4951
5052 /**
51- * For internal use only. Configures all properties in the class according to
52- * the given information.
53+ * For internal use only. Configures all properties in the class according
54+ * to the given information.
5355 *
5456 * @param request
5557 * the Vaadin request to read the information from
@@ -301,6 +303,9 @@ public boolean isAndroid() {
301303 */
302304 @ Deprecated
303305 public boolean isIOS () {
306+ if (browserDetails == null ) {
307+ return false ;
308+ }
304309 return browserDetails .isIOS ();
305310 }
306311
@@ -327,6 +332,9 @@ public boolean isIPhone() {
327332 */
328333 @ Deprecated
329334 public boolean isIPad () {
335+ if (browserDetails == null ) {
336+ return false ;
337+ }
330338 return browserDetails .isIPad ();
331339 }
332340
You can’t perform that action at this time.
0 commit comments