From dbcada039163335ca2aca5c96d7e3a5116eb8d01 Mon Sep 17 00:00:00 2001 From: Antoine Doubovetzky Date: Wed, 1 Jun 2022 17:13:11 -0700 Subject: [PATCH] fire: (FileReader) remove unused _subscriptions attribute (#33946) Summary: I was reading source code, and I noticed the _subscriptions attribute (and the _clearSubscriptions method) of the FileReader is not used. ## Changelog [Internal] [Changed] - Remove unused _subscriptions attribute in FileReader Pull Request resolved: https://github.com/facebook/react-native/pull/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 --- Libraries/Blob/FileReader.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Libraries/Blob/FileReader.js b/Libraries/Blob/FileReader.js index c58dfba687d..c0b7feaec71 100644 --- a/Libraries/Blob/FileReader.js +++ b/Libraries/Blob/FileReader.js @@ -46,7 +46,6 @@ class FileReader extends (EventTarget(...READER_EVENTS): any) { _error: ?Error; _result: ?ReaderResult; _aborted: boolean = false; - _subscriptions: Array = []; constructor() { super(); @@ -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'});