From 95895d6f4c575d2af751bc46c172277ca0de1d31 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 2 Jul 2018 17:36:07 +0100 Subject: [PATCH] =?utf8?q?JAL-3048=20attempt=20to=20catch=20Object(NaN)=20=E2?= =?utf8?q?=80=A6=20probably=20doesn=E2=80=99t=20work!?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/jalview/util/dialogrunner/DialogRunner.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/jalview/util/dialogrunner/DialogRunner.java b/src/jalview/util/dialogrunner/DialogRunner.java index b631128..fc99b2d 100644 --- a/src/jalview/util/dialogrunner/DialogRunner.java +++ b/src/jalview/util/dialogrunner/DialogRunner.java @@ -157,6 +157,12 @@ public class DialogRunner implements DialogRunnerI public void firstRun(Object responseObj) { + if (responseObj != null && !responseObj.equals(responseObj)) + { + // NaN is an object in Chrome - catch this weirdness + // this so we don't cause issues later + return; + } doFirstRun(new Response(responseObj)); } @@ -175,6 +181,13 @@ public class DialogRunner implements DialogRunnerI private void run(Response response) { + if (response.objresp != null + && !response.objresp.equals(response.objresp)) + { + // NaN is an object in Chrome - catch this weirdness + // this so we don't cause issues later + return; + } responses.add(response); List laction = callbacks.get(response); -- 1.7.10.2