From: Maxime Mériouma-Caron Date: Thu, 26 Nov 2015 07:54:11 +0000 (-0500) Subject: Fix tests X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=081412bfbae1dd80979db4695e1f36aa723fdfea;p=gwtquery.git Fix tests --- diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java index 541f1b5e..16f5f8c7 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java @@ -234,15 +234,15 @@ public class GQuery implements Lazy { if (o instanceof Function) { return new GQuery(((Function) o).getElement()); } + if (JsUtils.isElement(o)) { + return $(JsUtils. cast(o)); + } if (o instanceof JsonBuilder) { return new GQuery(((JsonBuilder) o).getDataImpl()); } if (o instanceof IsWidget) { return $(Arrays.asList(o)); } - if (o instanceof Element) { - return new GQuery((Element) o); - } if (o instanceof JavaScriptObject) { JavaScriptObject jso = (JavaScriptObject) o; // Execute a native javascript function like jquery does