diff --git a/src/controllers/controls/buildButtons.js b/src/controllers/controls/buildButtons.js index e426879..ac49d2f 100644 --- a/src/controllers/controls/buildButtons.js +++ b/src/controllers/controls/buildButtons.js @@ -44,7 +44,7 @@ module.exports = async (buttons, channel_id, controls_id) => { //Dont publish invalid button return; } - + if (button.break) { newButton.break = button.break; newButtons.push(newButton); @@ -116,6 +116,10 @@ module.exports = async (buttons, channel_id, controls_id) => { newButton.disabled = true; } + if (button.joystick) { + newButton.joystick = button.joystick; + } + newButtons.push(newButton); }); } else { diff --git a/src/controllers/robotServer.js b/src/controllers/robotServer.js index ee8a2a4..2bb8065 100644 --- a/src/controllers/robotServer.js +++ b/src/controllers/robotServer.js @@ -52,6 +52,9 @@ module.exports.getPublicServers = async () => { const { getRobotServersWithOwner } = require("../models/robotServer"); let getServers = await getRobotServersWithOwner(); let list = []; + if (getServers === null) { + return list; + } getServers.forEach((server) => { if (server.settings.unlist === true || server.settings.private === true) { //do nothing