extensionUtils: Stop using Lang.copyProperties()

It is now deprecated, so use object destructuring instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1498
This commit is contained in:
Florian Müllner 2020-11-13 23:54:56 +01:00 committed by Georges Basile Stavracas Neto
parent adb984cec7
commit 7521b9c4b2

View File

@ -9,7 +9,6 @@
const { Gio, GLib } = imports.gi; const { Gio, GLib } = imports.gi;
const Gettext = imports.gettext; const Gettext = imports.gettext;
const Lang = imports.lang;
const Config = imports.misc.config; const Config = imports.misc.config;
@ -211,8 +210,7 @@ function isOutOfDate(extension) {
} }
function serializeExtension(extension) { function serializeExtension(extension) {
let obj = {}; let obj = { ...extension.metadata };
Lang.copyProperties(extension.metadata, obj);
SERIALIZED_PROPERTIES.forEach(prop => { SERIALIZED_PROPERTIES.forEach(prop => {
obj[prop] = extension[prop]; obj[prop] = extension[prop];