arreglados problemas de lint
This commit is contained in:
@@ -127,13 +127,13 @@ async function buildCsvByUuid(): Promise<string> {
|
||||
} catch {
|
||||
history = [];
|
||||
}
|
||||
historyCache.set(uuid, history);
|
||||
historyCache.set(uuid, (history as any));
|
||||
}
|
||||
|
||||
// Build events_made generically:
|
||||
// - If kind starts with p1_ or p2_, include only when event.role matches P1/P2
|
||||
// - Otherwise include by default (system/agnostic events)
|
||||
const events = (history || []).filter((h: any) => {
|
||||
const events = (history ?? []).filter((h: any) => {
|
||||
const kind = (h?.kind || '').toString();
|
||||
if (!kind) return false;
|
||||
const evRole = kind.startsWith('p1_') ? 'P1' : (kind.startsWith('p2_') ? 'P2' : null);
|
||||
@@ -253,13 +253,13 @@ async function handleFileUpload(event: Event) {
|
||||
: `Estado cargado exitosamente. ${result.message || 'NameManager actualizado.'}`;
|
||||
alert(message);
|
||||
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.error('Error uploading nameManager state:', error);
|
||||
|
||||
// Handle different error types
|
||||
if (error.message && error.message.includes('413')) {
|
||||
if (error?.message && error.message.includes('413')) {
|
||||
alert('Error: El archivo es demasiado grande (máximo 50MB). Considera crear un archivo de guardado más pequeño.');
|
||||
} else if (error.message && error.message.includes('400')) {
|
||||
} else if (error?.message && error.message.includes('400')) {
|
||||
alert('Error: Archivo inválido. Asegúrate de subir un archivo .snatchSave válido.');
|
||||
} else {
|
||||
alert('Error al cargar el estado del nameManager. Verifica que el archivo sea válido y la conexión sea estable.');
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, computed } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import AnimatedNumber from '../views/games/AnimatedNumber.vue';
|
||||
|
||||
interface SystemMessage {
|
||||
|
||||
Reference in New Issue
Block a user