mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 11:39:21 +02:00
web: remove SharedWorker requirement for multi tab sqlite driver
This commit is contained in:
@@ -56,7 +56,7 @@ async function initializeDatabase(persistence: DatabasePersistence) {
|
||||
);
|
||||
await storage.migrate();
|
||||
|
||||
const multiTab = !!globalThis.SharedWorker && isFeatureSupported("opfs");
|
||||
const multiTab = isFeatureSupported("opfs");
|
||||
database.setup({
|
||||
sqliteOptions: {
|
||||
dialect: (name, init) =>
|
||||
|
||||
@@ -247,7 +247,7 @@ function errorToString(error: unknown) {
|
||||
}
|
||||
|
||||
async function resetDatabase() {
|
||||
const multiTab = !!globalThis.SharedWorker && isFeatureSupported("opfs");
|
||||
const multiTab = isFeatureSupported("opfs");
|
||||
await useKeyStore.getState().clear();
|
||||
const dialect = createDialect({
|
||||
name: "notesnook",
|
||||
|
||||
@@ -27,7 +27,7 @@ import { isFeatureSupported } from "./feature-check";
|
||||
|
||||
let logger: typeof _logger = new NoopLogger();
|
||||
async function initializeLogger() {
|
||||
const multiTab = !!globalThis.SharedWorker && isFeatureSupported("opfs");
|
||||
const multiTab = isFeatureSupported("opfs");
|
||||
await initialize(
|
||||
{
|
||||
dialect: (name, init) =>
|
||||
|
||||
Reference in New Issue
Block a user