fix: remove workspace id from indexeddb document name (#6700)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2024-09-24 14:23:06 +07:00 committed by GitHub
parent daf4247b07
commit d849a5da1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { getMetadata } from '@hcengineering/platform'
import presentation from '@hcengineering/presentation'
import { type Doc as YDoc } from 'yjs'
import { IndexeddbPersistence } from 'y-indexeddb'
@ -26,11 +24,7 @@ export class IndexeddbProvider extends IndexeddbPersistence implements Provider
readonly awareness: Awareness | null = null
constructor (documentId: string, doc: YDoc) {
const workspaceId: string = getMetadata(presentation.metadata.WorkspaceId) ?? ''
const name = `${workspaceId}/${documentId}`
super(name, doc)
super(documentId, doc)
this.loaded = new Promise((resolve) => {
this.on('synced', resolve)