Skip to content

Commit 4833fbb

Browse files
committed
fix: the method key was removed and I added back
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 610eb24 commit 4833fbb

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

lib/Controller/IdentifyAccountController.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,14 @@ private function formatForNcSelect(array $list): array {
144144
$return[$key]['method'] = 'account';
145145
$return[$key]['icon'] = 'icon-user';
146146
} elseif ($item['value']['shareType'] === SignerPlugin::TYPE_SIGNER) {
147-
if (
148-
!isset($return[$key]['method'])
149-
&& empty($return[$key]['method'])
150-
&& !empty($item['key'])
151-
) {
152-
$return[$key]['method'] = $item['key'];
153-
}
154-
if ($item['key'] === 'email') {
147+
$return[$key]['method'] = $item['method'] ?? '';
148+
if ($item['method'] === 'email') {
155149
$return[$key]['icon'] = 'icon-mail';
156-
} elseif ($item['key'] === 'account') {
150+
} elseif ($item['method'] === 'account') {
157151
$return[$key]['icon'] = 'icon-user';
158152
} else {
159-
$return[$key]['iconSvg'] = 'svg' . ucfirst($item['key']);
160-
$return[$key]['iconName'] = $item['key'];
153+
$return[$key]['iconSvg'] = 'svg' . ucfirst($item['method']);
154+
$return[$key]['iconName'] = $item['method'];
161155
}
162156
}
163157
}

0 commit comments

Comments
 (0)