Closed Alpvax closed 6 years ago
@dotcypress Well, and what are the reasons for using ref.update
instead of ref.set
? If they are strong, we can add a line to manually set __scene
to null
if it's undefined
, which will effectively remove it from the database.
When
SceneContext.leave()
is called, it removes the__scene
property from the session object. But when the session is saved it checks if the session is an empty object, and if so removes it from the database. If it is not an empty object it callsref.update
, which doesn't remove the__scene
property from the database. It should callref.set
instead.