Skip to content

Commit 7d7e19b

Browse files
committed
tweak logic
1 parent c38e4e6 commit 7d7e19b

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

packages/zeego/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zeego",
3-
"version": "3.0.3",
3+
"version": "3.0.4",
44
"description": "Logical UI primitives, made for screens.",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

packages/zeego/src/menu/create-android-menu/index.android.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@ If you want to use a custom component as your <Content />, you can use the creat
234234

235235
for (let i = 0; i < maybeTitle.length; i++) {
236236
const text = maybeTitle[i]
237-
if (typeof text == 'string') {
237+
if (text == null) {
238+
continue
239+
}
240+
if (typeof text == 'string' || typeof text == 'number') {
238241
stringTitle += text
239242
isString = true
240243
} else {

packages/zeego/src/menu/create-ios-menu/index.ios.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,10 @@ If you want to use a custom component as your <Content />, you can use the creat
230230

231231
for (let i = 0; i < maybeTitle.length; i++) {
232232
const text = maybeTitle[i]
233-
if (typeof text == 'string') {
233+
if (text == null) {
234+
continue
235+
}
236+
if (typeof text == 'string' || typeof text == 'number') {
234237
stringTitle += text
235238
isString = true
236239
} else {

0 commit comments

Comments
 (0)