Skip to content

Commit

Permalink
fix: 修复版本比对因缓存问题比对错误的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hacxy committed Mar 26, 2024
1 parent 5adaa76 commit dc0393b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -41,7 +41,7 @@
<image align="right" height="325px" src="https://raw.githubusercontent.com/hacxy/hacxy/main/images/%E5%BD%95%E5%B1%8F2024-03-21%2023.18.31.gif"/>

```html
<script src="https://cdn.jsdelivr.net/npm/oh-my-live2d/dist/index.min.js"></script>
<script src="https://unpkg.com/oh-my-live2d@latest"></script>
<script>
OML2D.loadOml2d({
models: [
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/index.md
Expand Up @@ -79,7 +79,7 @@ yarn add oh-my-live2d@latest
<title>OhMyLive2D</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/oh-my-live2d/dist/index.min.js"></script>
<script src="https://unpkg.com/oh-my-live2d@latest"></script>
<script>
OML2D.loadOml2d({
models: [
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Expand Up @@ -37,7 +37,7 @@ features:
<img align="right" style="margin-left:10px;border-radius: 10px;height:397px" src="https://loclink-1259720482.cos.ap-beijing.myqcloud.com/image/%E5%BD%95%E5%B1%8F2024-03-21%2023.18.31.gif"/>

```html
<script src="https://cdn.jsdelivr.net/npm/oh-my-live2d/dist/index.min.js"></script>
<script src="https://unpkg.com/oh-my-live2d@latest"></script>
<script>
OML2D.loadOml2d({
models: [
Expand Down
2 changes: 1 addition & 1 deletion packages/oh-my-live2d/src/utils/index.ts
Expand Up @@ -94,7 +94,7 @@ export const loadScript = (sdkInfo: { url: string; id: string }): Promise<void>

// 检查版本
export const checkVersion = async (): Promise<void> => {
const result = await fetch('https://unpkg.com/oh-my-live2d/package.json');
const result = await fetch('https://unpkg.com/oh-my-live2d@latest/package.json');
const { version } = <{ version: string }>await result.json();

if (version !== __VERSION__) {
Expand Down
1 change: 1 addition & 0 deletions tests/vite-app/index.html
Expand Up @@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<script src="index.min.js"></script>
<!-- <script src="https://unpkg.com/oh-my-live2d@latest"></script> -->
</head>
<body>
<div id="app"></div>
Expand Down
4 changes: 2 additions & 2 deletions tests/vite-app/public/index.min.js

Large diffs are not rendered by default.

0 comments on commit dc0393b

Please sign in to comment.