ripples: Remove unreachable return statements

Throwing an exception stops execution of the current function,
so the following return statements are both unnecessary and
unreachable.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
This commit is contained in:
Florian Müllner 2019-06-29 14:36:13 +02:00 committed by Georges Basile Stavracas Neto
parent 9476aa598a
commit 6970f43e66

View File

@ -61,10 +61,8 @@ var Ripples = class Ripples {
} }
addTo(stage) { addTo(stage) {
if (this._stage !== undefined) { if (this._stage !== undefined)
throw new Error('Ripples already added'); throw new Error('Ripples already added');
return;
}
this._stage = stage; this._stage = stage;
this._stage.add_actor(this._ripple1); this._stage.add_actor(this._ripple1);
@ -73,10 +71,8 @@ var Ripples = class Ripples {
} }
playAnimation(x, y) { playAnimation(x, y) {
if (this._stage === undefined) { if (this._stage === undefined)
throw new Error('Ripples not added'); throw new Error('Ripples not added');
return;
}
this._x = x; this._x = x;
this._y = y; this._y = y;