Skip to content

Commit 41b81f6

Browse files
author
Bart Coppens
committed
Fix warning and e2e test run
1 parent 1bfb217 commit 41b81f6

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
test:
99
timeout-minutes: 10
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
1313
shard: [1/3, 2/3, 3/3]

src/tools/national-id-generator/national-id-generator.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import type { Gender, GenerateOptions } from './national-id-generator.types';
55
import { useCopy } from '@/composable/copy';
66
77
function countryCodeToFlag(code: string): string {
8-
return [...code.toUpperCase()].map(c => String.fromCodePoint(0x1F1E6 + c.charCodeAt(0) - 65)).join('');
8+
return [...code.toUpperCase()].map((c) => {
9+
const codePoint = c.codePointAt(0);
10+
return codePoint === undefined ? '' : String.fromCodePoint(0x1F1E6 + codePoint - 65);
11+
}).join('');
912
}
1013
1114
const countries = Object.values(strategies).map(s => ({ value: s.countryCode, label: `${countryCodeToFlag(s.countryCode)} ${s.label}` }));

0 commit comments

Comments
 (0)