Fix: キャラクター以外のシートの編集画面でエラーが発生していたのを修正 #145
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
現象
キャラクターをあつかわないシートの編集画面において、 JS で例外が発生していた。
該当するシート:
原因
dd9c844#diff-0a51076b029b7a29306292ed0366383c8e7318ce6536e87d464ac5cb8dfc60fc において、 edit.js (つまりキャラクター以外のシートでも実行されるスクリプト)内で、無条件に
setSortable('unitStatus', '#unit-status-optional', 'tr');
が実行されていた。対処方法
#unit-status-optional
が存在する場合にのみ実行するようにした。