[gnome-shell] extensionUtils: Stop using Lang.copyProperties()
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensionUtils: Stop using Lang.copyProperties()
- Date: Mon, 16 Nov 2020 18:08:41 +0000 (UTC)
commit 7521b9c4b2c1c11f2b7735b70017b496104bb24d
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Nov 13 23:54:56 2020 +0100
extensionUtils: Stop using Lang.copyProperties()
It is now deprecated, so use object destructuring instead.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1498
js/misc/extensionUtils.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/js/misc/extensionUtils.js b/js/misc/extensionUtils.js
index 128fc07d0f..d9a5721cf5 100644
--- a/js/misc/extensionUtils.js
+++ b/js/misc/extensionUtils.js
@@ -9,7 +9,6 @@
const { Gio, GLib } = imports.gi;
const Gettext = imports.gettext;
-const Lang = imports.lang;
const Config = imports.misc.config;
@@ -211,8 +210,7 @@ function isOutOfDate(extension) {
}
function serializeExtension(extension) {
- let obj = {};
- Lang.copyProperties(extension.metadata, obj);
+ let obj = { ...extension.metadata };
SERIALIZED_PROPERTIES.forEach(prop => {
obj[prop] = extension[prop];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]