Skip to content

Commit

Permalink
Define exportable properties with 'var'
Browse files Browse the repository at this point in the history
This is to fix this new gjs warning:

```
Some code accessed the property 'PanelWidget' on the module
'panelWidget'. That property was defined with 'let' or 'const' inside
the module. This was previously supported, but is not correct according
to the ES6 standard. Any symbols to be exported from a module must be
defined with 'var'. The property access will work as previously for the
time being, but please fix your code anyway.
```

Ref.: #198 #205
  • Loading branch information
rhertzog authored and elbenfreund committed Mar 11, 2018
1 parent 909a9dd commit 5383bd4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion extension/widgets/categoryTotalsWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Stuff = Me.imports.stuff;
/**
* Custom Label widget that displays category totals.
*/
const CategoryTotalsWidget = new Lang.Class({
var CategoryTotalsWidget = new Lang.Class({
Name: 'CategoryTotals',
Extends: St.Label,

Expand Down
2 changes: 1 addition & 1 deletion extension/widgets/factsBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const TodaysFactsWidget = Me.imports.widgets.todaysFactsWidget.TodaysFactsWidget
* well as todays facts.
* @class
*/
const FactsBox = new Lang.Class({
var FactsBox = new Lang.Class({
Name: 'FactsBox',
Extends: PopupMenu.PopupBaseMenuItem,
_init: function(controller, panelWidget) {
Expand Down
2 changes: 1 addition & 1 deletion extension/widgets/ongoingFactEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Me = imports.misc.extensionUtils.getCurrentExtension();
*
*
*/
const OngoingFactEntry = new Lang.Class({
var OngoingFactEntry = new Lang.Class({
Name: 'OngoingFactEntry',
Extends: St.Entry,

Expand Down
2 changes: 1 addition & 1 deletion extension/widgets/panelWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const Stuff = Me.imports.stuff;
*
* @class
*/
const PanelWidget = new Lang.Class({
var PanelWidget = new Lang.Class({
Name: 'PanelWidget',
Extends: PanelMenu.Button,

Expand Down
2 changes: 1 addition & 1 deletion extension/widgets/todaysFactsWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Stuff = Me.imports.stuff;
/**
* A widget that lists all facts for *today*.
*/
const TodaysFactsWidget = new Lang.Class({
var TodaysFactsWidget = new Lang.Class({
Name: 'TodaysFactsWidget',
Extends: St.ScrollView,

Expand Down

0 comments on commit 5383bd4

Please sign in to comment.