You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.
Currently, the clear method of the ViewManager class is using the Object.values method on the views list which is a Map as follows:
since the Object.values does not work on a Map and returns an empty array, the views are not getting destroyed.
(just try Object.values(new Map([['a', {a:1}], ['b', {b:2}]])) in the console)
for example, if you have multiple windows open and in one of them a video is playing, after closing that window the video keeps playing until the app is closed.
The text was updated successfully, but these errors were encountered:
I'm not sure why the Object.values method is used in this line, but the fix is simply to remove it and use the forEach method on the this.views itself, something like this:
this.views.forEach((x: View)=>x.destroy())
if it's ok I can create a new PR for this change 😊
Currently, the
clear
method of theViewManager
class is using theObject.values
method on the views list which is aMap
as follows:since the
Object.values
does not work on aMap
and returns an empty array, the views are not getting destroyed.(just try
Object.values(new Map([['a', {a:1}], ['b', {b:2}]]))
in the console)for example, if you have multiple windows open and in one of them a video is playing, after closing that window the video keeps playing until the app is closed.
The text was updated successfully, but these errors were encountered: