From c1e23c0e108c54c5490ca46b242cd86774f4c509 Mon Sep 17 00:00:00 2001 From: ShanaMaid Date: Fri, 15 Feb 2019 14:30:10 +0800 Subject: [PATCH] fix(icon): add cache --- CHANGELOG.md | 4 ++++ components/Icon/Icon.tsx | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c771ac..9bfbfe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.8.19](https://github.com/Yoshino-UI/Yoshino/compare/v0.8.18...v0.8.19) (2019-01-29) + + + ## [0.8.18](https://github.com/Yoshino-UI/Yoshino/compare/v0.8.17...v0.8.18) (2019-01-29) diff --git a/components/Icon/Icon.tsx b/components/Icon/Icon.tsx index a918643..a25f165 100644 --- a/components/Icon/Icon.tsx +++ b/components/Icon/Icon.tsx @@ -37,6 +37,7 @@ export class Icon extends Component { svg = svgCaches[type]; } else { svg = await Archer.fetchSvg(`${svgTarget}${type}.svg`); + svgCaches[type] = svg; } return svg; }