Skip to content

Commit

Permalink
hotfix: [release-0.22] AudioCellが0個のときにDEFAULT_PROJECT_FILE_BASE_NAME…
Browse files Browse the repository at this point in the history
…でエラーが発生しないように修正 (#2484)

Co-authored-by: Hiroshiba <[email protected]>
  • Loading branch information
sigprogramming and Hiroshiba authored Jan 14, 2025
1 parent 3db6523 commit 300fef1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/store/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,12 @@ export const audioStore = createPartialStore<AudioStoreTypes>({

DEFAULT_PROJECT_FILE_BASE_NAME: {
getter: (state) => {
// NOTE: 起動時にソングエディタが開かれた場合、トークの初期化が行われずAudioCellが作成されない
// TODO: ソングエディタが開かれてい場合はこの関数を呼ばないようにし、warningを出す
if (state.audioKeys.length === 0) {
return DEFAULT_PROJECT_NAME;
}

const headItemText = state.audioItems[state.audioKeys[0]].text;

const tailItemText =
Expand Down

0 comments on commit 300fef1

Please sign in to comment.