알림목록 오류 수정

This commit is contained in:
Macbook
2026-06-11 00:30:19 +09:00
parent 54fdc3e77a
commit e9d83f2058
2 changed files with 25 additions and 10 deletions
@@ -7,7 +7,11 @@ import {
loadStrategyForNotification,
type StrategyDto,
} from './backendApi';
import { reconcileStrategyMissingWithValidIds, unmarkStrategyMissingOnServer } from './strategyMissingCache';
import {
isStrategyMissingOnServer,
reconcileStrategyMissingWithValidIds,
unmarkStrategyMissingOnServer,
} from './strategyMissingCache';
import { coerceFiniteNumber } from './safeFormat';
import { hydrateStrategyDto, normalizeMarketCode } from './strategyHydrate';
import { extractVirtualConditions } from './virtualStrategyConditions';
@@ -77,12 +81,14 @@ export async function resolveNotificationStrategy(
if (fromList?.id != null && hasExtractableConditions(fromList)) {
return pickStrategy(fromList, normalizedId);
}
const loaded = await loadStrategyForNotification(normalizedId);
if (loaded && extractVirtualConditions(loaded).length > 0) {
return { strategy: loaded, strategyId: normalizedId };
}
if (loaded) {
return { strategy: loaded, strategyId: normalizedId };
if (!isStrategyMissingOnServer(normalizedId)) {
const loaded = await loadStrategyForNotification(normalizedId);
if (loaded && extractVirtualConditions(loaded).length > 0) {
return { strategy: loaded, strategyId: normalizedId };
}
if (loaded) {
return { strategy: loaded, strategyId: normalizedId };
}
}
}
@@ -93,9 +99,11 @@ export async function resolveNotificationStrategy(
if (hasExtractableConditions(byName)) {
return pickStrategy(byName, byName.id);
}
const loaded = await loadStrategyForNotification(byName.id);
if (loaded) {
return { strategy: loaded, strategyId: byName.id };
if (!isStrategyMissingOnServer(byName.id)) {
const loaded = await loadStrategyForNotification(byName.id);
if (loaded) {
return { strategy: loaded, strategyId: byName.id };
}
}
}
}