Open
Description
Operating System
macOS
Browser Version
Safari 16.5.2
Firebase SDK Version
10.7.0
Firebase SDK Product:
Storage
Describe your project's tooling
index.html with source tag. Just javascript.
Describe the problem
Example 3 is partly broken.
Steps and code to reproduce issue
This snippet is broken
var handle = uploadTask.on('state_changed');//changed from firebase.storage.TaskEvent.STATE_CHANGED
unsubscribe = handle(function(snapshot) {
var percent = snapshot.bytesTransferred / snapshot.totalBytes * 100;
console.log(percent + "% done");
// Stop after receiving one update.
unsubscribe();
});
It does not work. I get the error undefined is not an object (evaluating 't.next')
. It seems that the on
method can only return Unsubscribe.