fix(disposable/deduped): call dispose with disposable context
This commit is contained in:
parent
b243ff94e9
commit
8921d78610
@ -17,15 +17,15 @@ exports.deduped = (factory, keyFn = (...args) => args) =>
|
||||
if (state === undefined) {
|
||||
const result = factory.apply(this, arguments)
|
||||
|
||||
const createFactory = ({ value, dispose }) => {
|
||||
const createFactory = disposable => {
|
||||
const wrapper = {
|
||||
dispose() {
|
||||
if (--state.users === 0) {
|
||||
states.delete(keys)
|
||||
return dispose()
|
||||
return disposable.dispose()
|
||||
}
|
||||
},
|
||||
value,
|
||||
value: disposable.value,
|
||||
}
|
||||
|
||||
return () => {
|
||||
|
@ -32,6 +32,7 @@
|
||||
>
|
||||
> In case of conflict, the highest (lowest in previous list) `$version` wins.
|
||||
|
||||
- @xen-orchestra/disposable patch
|
||||
- xo-server-transport-email minor
|
||||
- @xen-orchestra/fs minor
|
||||
- @xen-orchestra/xapi minor
|
||||
|
Loading…
Reference in New Issue
Block a user