aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-07 00:24:34 +0800
committercrupest <crupest@outlook.com>2020-08-07 00:24:34 +0800
commitb9ce9127f336a2017056f863e01ff789f57ac83f (patch)
treec3590b14d3332ba058112f166307fc39c1ad5607
parent60124e9d83ae2b4ab90d5d45cd5cdfcacc9c3e1b (diff)
downloadtimeline-b9ce9127f336a2017056f863e01ff789f57ac83f.tar.gz
timeline-b9ce9127f336a2017056f863e01ff789f57ac83f.tar.bz2
timeline-b9ce9127f336a2017056f863e01ff789f57ac83f.zip
Fix a bug in timeline service.
-rw-r--r--Timeline/ClientApp/src/app/data/timeline.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/Timeline/ClientApp/src/app/data/timeline.ts b/Timeline/ClientApp/src/app/data/timeline.ts
index 508363a4..c0d2141f 100644
--- a/Timeline/ClientApp/src/app/data/timeline.ts
+++ b/Timeline/ClientApp/src/app/data/timeline.ts
@@ -156,8 +156,8 @@ export class TimelineService {
private async doFetchAndCacheTimeline(
timelineName: string
): Promise<FetchAndCacheTimelineResult> {
- const cache = await dataStorage.getItem<TimelineCache | null>(timelineName);
const key = this.getTimelineKey(timelineName);
+ const cache = await dataStorage.getItem<TimelineCache | null>(key);
const save = (cache: TimelineCache): Promise<TimelineCache> =>
dataStorage.setItem<TimelineCache>(key, cache);