Define classes with 'var' instead of 'const'
Any symbols (including class properties) that should be visible outside the module it's defined in need to be defined as global. For now gjs still allows the access for 'const', but get rid of the warnings spill now by changing it. https://bugzilla.gnome.org/show_bug.cgi?id=785084
This commit is contained in:
@ -19,7 +19,7 @@ const AVATAR_ICON_SIZE = 64;
|
||||
// Copyright (C) 2004-2005 James M. Cape <jcape@ignore-your.tv>.
|
||||
// Copyright (C) 2008,2009 Red Hat, Inc.
|
||||
|
||||
const Avatar = new Lang.Class({
|
||||
var Avatar = new Lang.Class({
|
||||
Name: 'Avatar',
|
||||
|
||||
_init: function(user, params) {
|
||||
@ -59,7 +59,7 @@ const Avatar = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
const UserWidgetLabel = new Lang.Class({
|
||||
var UserWidgetLabel = new Lang.Class({
|
||||
Name: 'UserWidgetLabel',
|
||||
Extends: St.Widget,
|
||||
|
||||
@ -144,7 +144,7 @@ const UserWidgetLabel = new Lang.Class({
|
||||
},
|
||||
});
|
||||
|
||||
const UserWidget = new Lang.Class({
|
||||
var UserWidget = new Lang.Class({
|
||||
Name: 'UserWidget',
|
||||
|
||||
_init: function(user) {
|
||||
|
Reference in New Issue
Block a user