Skip to content

Commit

Permalink
Merge pull request #545 from OpenWebGAL/dev
Browse files Browse the repository at this point in the history
fix: return {key} when did not get value from state
  • Loading branch information
MakinoharaShoko authored Aug 30, 2024
2 parents cc4ab2c + 85a6255 commit ed9d047
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/webgal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "webgal",
"private": true,
"version": "4.5.5",
"version": "4.5.6",
"scripts": {
"dev": "vite --host --port 3000",
"build": "cross-env NODE_ENV=production tsc && vite build --base=./",
Expand Down
2 changes: 1 addition & 1 deletion packages/webgal/public/game/template/template.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name":"Default Template",
"webgal-version":"4.5.5"
"webgal-version":"4.5.6"
}
4 changes: 2 additions & 2 deletions packages/webgal/src/Core/gameScripts/setVar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ export function getValueFromState(key: string) {
}

/**
* 取不到时返回 key
* 取不到时返回 {key}
*/
export function getValueFromStateElseKey(key: string) {
const valueFromState = getValueFromState(key);
if (valueFromState === null || valueFromState === undefined) {
logger.warn('valueFromState result null, key = ' + key);
return key;
return `{${key}}`;
}
return valueFromState;
}
2 changes: 1 addition & 1 deletion packages/webgal/src/config/info.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const __INFO = {
version: 'WebGAL 4.5.5',
version: 'WebGAL 4.5.6',
contributors: [
// 现在改为跳转到 GitHub 了
],
Expand Down
6 changes: 6 additions & 0 deletions releasenote.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#### 修复

4.5.6 修复:无法从状态中获取到对应 key 的变量时,返回 {key} 以避免变换不生效

修复了 `-concat` 选项动画在新行中的错误。

修复了样式定义时 ruby 不显示的问题。
Expand Down Expand Up @@ -52,6 +54,8 @@ Added a new parameter to control "execute the next statement after the performan

#### Bug Fixes

4.5.6 Fix: When the corresponding key variable cannot be obtained from the state, return {key} to avoid ineffective transformation.

Fixed an animation error with the `-concat` option in a new line.

Fixed an issue where ruby was not displayed when a style was defined.
Expand Down Expand Up @@ -92,6 +96,8 @@ Fixed the logo image issue.

#### 修正

4.5.6 修正:状態から対応する key の変数が取得できない場合、{key} を返すようにし、変換が無効になるのを回避しました

`-concat` オプションのアニメーションが新しい行でエラーになる問題を修正しました。

スタイルが定義されているときにルビが表示されない問題を修正しました。
Expand Down

0 comments on commit ed9d047

Please sign in to comment.