refactor(slash-commands): 优化 /goto-floor 命令的代码格式和注释

- 修正 EDLint 标记错误
This commit is contained in:
awaae001
2025-04-23 00:05:35 +08:00
parent 485d07b91f
commit 6d0318eb36

View File

@ -2138,7 +2138,7 @@ export function initDefaultSlashCommands() {
// Validate input // Validate input
if (isNaN(floorIndex) || floorIndex < 0 || (typeof chat !== 'undefined' && floorIndex >= chat.length)) { if (isNaN(floorIndex) || floorIndex < 0 || (typeof chat !== 'undefined' && floorIndex >= chat.length)) {
const maxIndex = (typeof chat !== 'undefined' ? chat.length - 1 : 'unknown'); const maxIndex = (typeof chat !== 'undefined' ? chat.length - 1 : 'unknown');
toastr.warning(`Invalid message index: ${index}. Please enter a number between 0 and ${maxIndex}.`); toastr.warning(`Invalid message index: ${index}. Please enter a number between 0 and ${maxIndex}.`);
console.warn(`WARN: Invalid message index provided for /goto-floor: ${index}. Max index: ${maxIndex}`); console.warn(`WARN: Invalid message index provided for /goto-floor: ${index}. Max index: ${maxIndex}`);
return ''; return '';