this.disposable is undefined
See original GitHub issueSummary
I have run into a case where the typeof check below returns undefined
:
SliceSink.prototype.dispose = function () {
console.log("calling dispose", typeof this.disposable)
console.log("this", this)
return this.disposable.dispose()
}
TypeError: Cannot read property 'dispose' of undefined
at SliceSink.dispose (build/main.js:20834:25)
at SliceSink.event (build/main.js:20826:10)
at tryEvent (build/main.js:2483:10)
at SubscriberSink.next (build/main.js:22463:92)
at SubscriptionObserver.next (build/main.js:23958:14)
at observerNext (build/main.js:6253:16)
at addListener (build/main.js:18989:17)
at attachListenerToElement (build/main.js:19101:13)
at utils.forEach (build/main.js:5604:22)
at Object.listenTo (build/main.js:19025:9)
Expected result
this.disposable should never be undefined or a better error for the user.
Actual Result
this.disposable is undefined
Versions
- most.js: ^1.2.2
Steps to reproduce
See code below
Code to reproduce
const FRP = require("most")
const Observable = require("zen-observable")
const makeProblemStream = () =>
new Observable((observer) => {
observer.next(1) // <-- Triggers error
const intervalId = setInterval(
() => { observer.next(1) },
1000
)
return () => clearInterval(intervalId)
})
FRP
.from(makeProblemStream())
.take(1)
.drain()
.catch(console.error)
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
The Disposable Pattern in TypeScript - Blog
The Disposable Pattern in TypeScript. Sep 7, 2019 ... myClass !== undefined); this.dispose.untrack(this.myClass).dispose(); this.myClass = undefined; // .
Read more >Error thrown for reading disposable email - Javascript
I am particularly using https://maildrop.cc/ to send the emails from external source and reading it. I have tried to use code mentioned here: ......
Read more >Complete Guide to Using Koi 2-Gram Disposable Vapes ...
Our Koi 2-Gram Disposable Vape Bars are the fastest, easiest, and arguably most enjoyable way to experience the benefits of cannabinoids. These ...
Read more >How to use the monaco-editor.editor.createModel function ...
disposable.add( (this.baseModel = monacoEditor.createModel( this.file.baseRaw, undefined, new Uri( ...
Read more >XTRA FLAVORS
This products contains Nicotine. ... XTRA® started its humble beginnings with a clear vision that disposable devices are the future of vaping.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @briancavalier I just tried out your branch in forto and it works!
On a side note, just wanted say thanks for your fantastic OSS contributions. More over, you conduct yourself with an amazing humility and humanity… its always a pleasure to interact with you!
Great, thanks @jasonkuhrt. I’ll start to dig into this.