Skip to content

Commit a92cd42

Browse files
renonick87crokita
andauthored
Apply suggestions from code review
Co-authored-by: Chris <[email protected]>
1 parent 86d0756 commit a92cd42

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

examples/js/hello-sdl/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154

155155

156156
for (const buttonName of buttonNames) {
157-
if (availableButtons.indexOf(buttonName) > 0) {
157+
if (availableButtons.indexOf(buttonName) !== -1) {
158158
console.log('Subscribing to', buttonName);
159159
await screenManager.addButtonListener(buttonName, this._onButtonListener.bind(this)).catch(function (err) {
160160
console.error(err);

examples/node/hello-sdl-tcp/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class AppClient {
149149
ButtonName.TUNEUP, ButtonName.TUNEDOWN];
150150

151151
for (const buttonName of buttonNames) {
152-
if (availableButtons.indexOf(buttonName) > 0) {
152+
if (availableButtons.indexOf(buttonName) !== -1) {
153153
console.log('Subscribing to', buttonName);
154154
await screenManager.addButtonListener(buttonName, this._onButtonListener.bind(this)).catch(function (err) {
155155
console.error(err);
@@ -233,4 +233,4 @@ class AppClient {
233233
}
234234

235235
console.log('start app');
236-
new AppClient();
236+
new AppClient();

examples/node/hello-sdl/AppClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class AppClient {
143143
ButtonName.TUNEUP, ButtonName.TUNEDOWN];
144144

145145
for (const buttonName of buttonNames) {
146-
if (availableButtons.indexOf(buttonName) > 0) {
146+
if (availableButtons.indexOf(buttonName) !== -1) {
147147
console.log('Subscribing to', buttonName);
148148
await screenManager.addButtonListener(buttonName, this._onButtonListener.bind(this)).catch(function (err) {
149149
console.error(err);

examples/webengine/hello-sdl/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
ButtonName.TUNEUP, ButtonName.TUNEDOWN];
185185

186186
for (const buttonName of buttonNames) {
187-
if (availableButtons.indexOf(buttonName) > 0) {
187+
if (availableButtons.indexOf(buttonName) !== -1) {
188188
console.log('Subscribing to', buttonName);
189189
await screenManager.addButtonListener(buttonName, this._onButtonListener.bind(this)).catch(function (err) {
190190
console.error(err);

0 commit comments

Comments
 (0)