mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
cleanup: Use type-safe comparisons
We have been using type-safe comparisons in new code for quite a while now, however old code has only been adapted slowly. Change all the remaining bits to get rid of another legacy style difference. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2866>
This commit is contained in:
parent
9a3913d4a0
commit
a42f7c2384
94 changed files with 847 additions and 845 deletions
|
|
@ -49,12 +49,12 @@ class SmartcardManager extends Signals.EventEmitter {
|
|||
this._addToken(tokens[i]);
|
||||
|
||||
this._objectManager.connect('interface-added', (objectManager, interfaceName, proxy) => {
|
||||
if (interfaceName == 'org.gnome.SettingsDaemon.Smartcard.Token')
|
||||
if (interfaceName === 'org.gnome.SettingsDaemon.Smartcard.Token')
|
||||
this._addToken(proxy);
|
||||
});
|
||||
|
||||
this._objectManager.connect('interface-removed', (objectManager, interfaceName, proxy) => {
|
||||
if (interfaceName == 'org.gnome.SettingsDaemon.Smartcard.Token')
|
||||
if (interfaceName === 'org.gnome.SettingsDaemon.Smartcard.Token')
|
||||
this._removeToken(proxy);
|
||||
});
|
||||
}
|
||||
|
|
@ -94,12 +94,12 @@ class SmartcardManager extends Signals.EventEmitter {
|
|||
_removeToken(token) {
|
||||
let objectPath = token.get_object_path();
|
||||
|
||||
if (this._insertedTokens[objectPath] == token) {
|
||||
if (this._insertedTokens[objectPath] === token) {
|
||||
delete this._insertedTokens[objectPath];
|
||||
this.emit('smartcard-removed', token);
|
||||
}
|
||||
|
||||
if (this._loginToken == token)
|
||||
if (this._loginToken === token)
|
||||
this._loginToken = null;
|
||||
|
||||
token.disconnectAll();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue