This commit is contained in:
Daniella / Tove 2022-07-06 13:21:31 +02:00
parent c572fa5992
commit 0c43e416f5

View file

@ -34,11 +34,7 @@ public class BrowserContext {
private BrowserContext(String cookie, IRequestCatcher requestCatcher) {
this.requestCatcher = requestCatcher;
try {
data = AsyncJSON.read(cookie).err(e -> {throw new RuntimeException(e);}).ok().await();
} catch (Exception e) {
data = new TCN("JSON");
}
AsyncJSON.read(cookie).then(x -> data = x).err(e -> data = new TCN("json")).ok().await();
}
public static Task<BrowserContext> create(IRequestCatcher requestCatcher) {