Skip to content
Commit cb434488 authored by Jonas Dreßler's avatar Jonas Dreßler Committed by Florian Müllner
Browse files

misc/objectManager: Fix emission of object-removed signal

Emitting this signal is broken right now: We check for a length of 0 on
this._objects[objectPath], but the
`this._objects[objectPath][interfaceName] = null` we do before the
check doesn't actually remove the key, it only sets the value to null,
leaving the key around and thus the amount of entries in the object doesn't
change.

Fix that by using the delete statement instead, "delete" properly removes
the key and thus affects the amount of entries in the object, making our
length === 0 check effective.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2730>
(cherry picked from commit 8431e7ae)
parent b09b17f8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment