diff --git a/index.js b/index.js index ff9a564..3d403f9 100644 --- a/index.js +++ b/index.js @@ -113,9 +113,8 @@ async function postCode() { core.error(errorMessage); return; } - let api; + let api = new ScreepsAPI(login_arguments); if (token) { - api = new ScreepsAPI(login_arguments); const response = await api.code.set(branch, files_to_push); core.info(JSON.stringify(response, null, 2)); } else {