Skip to content

Commit 269e1a7

Browse files
committed
引数をオプションに
1 parent 82b687e commit 269e1a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/quickpicks/tagQuickPickCreator.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ async function suggestTags (value: string) {
3939
* @param selectedItems 選択済みのタグ
4040
* @return QuickPicker
4141
*/
42-
export function tagQuickPickCreator (selectedItems: QuickPickItem[]) {
42+
export function tagQuickPickCreator (selectedItems?: QuickPickItem[]) {
4343
const quickPick = window.createQuickPick();
4444

4545
quickPick.canSelectMany = true;
46-
quickPick.items = selectedItems;
47-
quickPick.selectedItems = selectedItems;
46+
quickPick.items = selectedItems || [];
47+
quickPick.selectedItems = selectedItems || [];
4848
quickPick.title = '投稿に登録するタグを入力してください';
4949
quickPick.placeholder = '例) Rails React Mastodon';
5050

0 commit comments

Comments
 (0)