From bd29d598b1284b846467bcfb3a476f84215dbfbc Mon Sep 17 00:00:00 2001 From: Alexander Corn Date: Fri, 2 Jun 2017 23:35:23 -0400 Subject: [PATCH] Throw Error if using confirmations without being logged in --- components/confirmations.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/confirmations.js b/components/confirmations.js index e355719..66770cd 100644 --- a/components/confirmations.js +++ b/components/confirmations.js @@ -243,6 +243,10 @@ SteamCommunity.prototype.acceptAllConfirmations = function(time, confKey, allowK }; function request(community, url, key, time, tag, params, json, callback) { + if (!community.steamID) { + throw new Error("Must be logged in before trying to do anything with confirmations"); + } + params = params || {}; params.p = SteamTotp.getDeviceID(community.steamID); params.a = community.steamID.getSteamID64();