mirror of
https://github.com/aljazceru/hypergolic.git
synced 2026-02-23 06:14:19 +01:00
problem: fetching event sometimes fails
This commit is contained in:
@@ -11,9 +11,18 @@
|
||||
$ndk.fetchEvent(productID).then((e) => {
|
||||
if (e) {
|
||||
productEvent = e;
|
||||
} else {
|
||||
let _p = $ndk.storeSubscribe([{ids:[productID] }], { subId: productID });
|
||||
_p.subscribe(x=>{
|
||||
if (x[0]) {
|
||||
productEvent = x[0]
|
||||
_p.unsubscribe()
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{#if productEvent}
|
||||
|
||||
Reference in New Issue
Block a user