]> source.dussan.org Git - gwtquery.git/commitdiff
Fix tests
authorMaxime Mériouma-Caron <maxime.meriouma@arcbees.com>
Thu, 26 Nov 2015 07:54:11 +0000 (02:54 -0500)
committerMaxime Mériouma-Caron <maxime.meriouma@arcbees.com>
Thu, 26 Nov 2015 07:54:11 +0000 (02:54 -0500)
gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java

index 541f1b5ec7a9f238db9332f3d7efeb9ab520c340..16f5f8c7a4454586502cd3b078de4607e4fb2506 100644 (file)
@@ -234,15 +234,15 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
       if (o instanceof Function) {
         return new GQuery(((Function) o).getElement());
       }
+      if (JsUtils.isElement(o)) {
+        return $(JsUtils.<Element> cast(o));
+      }
       if (o instanceof JsonBuilder) {
         return new GQuery(((JsonBuilder) o).<Element>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