diff --git a/jso/apis/src/main/java/org/teavm/jso/indexeddb/IDBFactory.java b/jso/apis/src/main/java/org/teavm/jso/indexeddb/IDBFactory.java index d02056fbc..4af07a6c3 100644 --- a/jso/apis/src/main/java/org/teavm/jso/indexeddb/IDBFactory.java +++ b/jso/apis/src/main/java/org/teavm/jso/indexeddb/IDBFactory.java @@ -28,7 +28,7 @@ public abstract class IDBFactory implements JSObject { public static IDBFactory getInstance() { IDBFactory factory = getInstanceImpl(); - if (!factory.isUndefined()) { + if (factory.isUndefined()) { throw new IllegalStateException("IndexedDB is not supported in this browser"); } return factory; diff --git a/jso/apis/src/main/java/org/teavm/jso/indexeddb/IDBObjectStore.java b/jso/apis/src/main/java/org/teavm/jso/indexeddb/IDBObjectStore.java index 167189b34..a955680b9 100644 --- a/jso/apis/src/main/java/org/teavm/jso/indexeddb/IDBObjectStore.java +++ b/jso/apis/src/main/java/org/teavm/jso/indexeddb/IDBObjectStore.java @@ -36,8 +36,8 @@ public abstract class IDBObjectStore implements JSObject, IDBCursorSource { } } - @JSBody(script = "return this;") - private native String[] unwrapStringArray(JSObject obj); + @JSBody(params = "obj", script = "return obj;") + private static native String[] unwrapStringArray(JSObject obj); @JSProperty public abstract String[] getIndexNames();