Skip to content

Commit

Permalink
fire: (FileReader) remove unused _subscriptions attribute (#33946)
Browse files Browse the repository at this point in the history
Summary:
I was reading source code, and I noticed the _subscriptions attribute (and the _clearSubscriptions method) of the FileReader is not used.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] [Changed] - Remove unused _subscriptions attribute in FileReader

Pull Request resolved: #33946

Test Plan: I checked that flow and jest are still green as I can't think about another way.

Reviewed By: lunaleaps

Differential Revision: D36807828

Pulled By: cortinico

fbshipit-source-id: 9bb599bbc7b79d2b4c010ba84cc8777e29b974ca
  • Loading branch information
Antoine Doubovetzky authored and facebook-github-bot committed Jun 2, 2022
1 parent 927b43d commit dbcada0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Libraries/Blob/FileReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class FileReader extends (EventTarget(...READER_EVENTS): any) {
_error: ?Error;
_result: ?ReaderResult;
_aborted: boolean = false;
_subscriptions: Array<any> = [];

constructor() {
super();
Expand All @@ -59,11 +58,6 @@ class FileReader extends (EventTarget(...READER_EVENTS): any) {
this._result = null;
}

_clearSubscriptions(): void {
this._subscriptions.forEach(sub => sub.remove());
this._subscriptions = [];
}

_setReadyState(newState: ReadyState) {
this._readyState = newState;
this.dispatchEvent({type: 'readystatechange'});
Expand Down

0 comments on commit dbcada0

Please sign in to comment.