π Spookyberb π β 13-03 Nov 23
Will this piece of code crash the app if it doesnt find anything?
7 Replies
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
@βSnowberbβ add a default value if
.find()
returns null
:
ooo I like this
that's what I wanted
but why
??
and not ||
?Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Alternatively you could use optional chaining without spread π€
!mdn optional chaining
This thread hasnβt had any activity in 12 hours, so itβs now locked.
Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1044961281167331379
Question not getting answered? Maybe it's hard to answer, or maybe you asked at a slow time. Check out these resources for help asking a good question:
https://stackoverflow.com/help/how-to-ask
http://wp.me/p2oIwo-26