mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Fix TypeError when destroying a pad
This commit is contained in:
parent
80d7d8235a
commit
d17fac9266
@ -239,7 +239,7 @@ const _join: Callback = (ctx, clientId, data) => {
|
||||
if (!["EDELETED","EEXPIRED","ERESTRICTED"].includes(type)) {
|
||||
return;
|
||||
}
|
||||
Store.leavePad(null, data, function () {});
|
||||
ctx.leavePad(null, data, function () {});
|
||||
};
|
||||
const conf = {
|
||||
Cache: store.neverCache ? undefined : Cache,
|
||||
@ -467,7 +467,8 @@ const init = (config) => {
|
||||
postMessage,
|
||||
store,
|
||||
Store,
|
||||
myDeletions: []
|
||||
myDeletions: [],
|
||||
leavePad: (clientId, data, cb) => {}
|
||||
};
|
||||
|
||||
const join: RpcCall = (clientId, data, cb) => {
|
||||
@ -512,6 +513,7 @@ const init = (config) => {
|
||||
dropChannel(ctx, data.channel);
|
||||
cb();
|
||||
};
|
||||
ctx.leavePad = leave;
|
||||
|
||||
const getChannels = () => {
|
||||
return ctx.channels;
|
||||
|
||||
2
www/common/worker.bundle.min.js
vendored
2
www/common/worker.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user