mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 21:03:30 +00:00
fix: remove workspace id from indexeddb document name (#6700)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
daf4247b07
commit
d849a5da1f
@ -12,8 +12,6 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
import { getMetadata } from '@hcengineering/platform'
|
|
||||||
import presentation from '@hcengineering/presentation'
|
|
||||||
|
|
||||||
import { type Doc as YDoc } from 'yjs'
|
import { type Doc as YDoc } from 'yjs'
|
||||||
import { IndexeddbPersistence } from 'y-indexeddb'
|
import { IndexeddbPersistence } from 'y-indexeddb'
|
||||||
@ -26,11 +24,7 @@ export class IndexeddbProvider extends IndexeddbPersistence implements Provider
|
|||||||
readonly awareness: Awareness | null = null
|
readonly awareness: Awareness | null = null
|
||||||
|
|
||||||
constructor (documentId: string, doc: YDoc) {
|
constructor (documentId: string, doc: YDoc) {
|
||||||
const workspaceId: string = getMetadata(presentation.metadata.WorkspaceId) ?? ''
|
super(documentId, doc)
|
||||||
|
|
||||||
const name = `${workspaceId}/${documentId}`
|
|
||||||
|
|
||||||
super(name, doc)
|
|
||||||
|
|
||||||
this.loaded = new Promise((resolve) => {
|
this.loaded = new Promise((resolve) => {
|
||||||
this.on('synced', resolve)
|
this.on('synced', resolve)
|
||||||
|
Loading…
Reference in New Issue
Block a user