Skip to content

Commit 09c958c

Browse files
committed
Renamed ID vars for readability
1 parent 631e805 commit 09c958c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

chatgpt.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -975,13 +975,13 @@ const chatgpt = {
975975
: msgToGet == 'latest' ? msgsToReturn[msgsToReturn.length - 1] // else if 'latest' passed, return latest
976976
: msgsToReturn[msgToGet] ) // else return element of array
977977

978-
function isUserMsgAncestor(messageId, targetUserId) {
979-
let currentId = messageId ; const maxDepth = 10 ; let depth = 0
980-
while (currentId && depth < maxDepth) {
981-
const currentMsg = data[currentId]
978+
function isUserMsgAncestor(msgID, targetUserID) {
979+
let currentID = msgID ; const maxDepth = 10 ; let depth = 0
980+
while (currentID && depth < maxDepth) {
981+
const currentMsg = data[currentID]
982982
if (!currentMsg?.message) return false
983-
if (currentMsg.id == targetUserId) return true
984-
currentId = currentMsg.parent ; depth++
983+
if (currentMsg.id == targetUserID) return true
984+
currentID = currentMsg.parent ; depth++
985985
}
986986
return false
987987
}

0 commit comments

Comments
 (0)