View Single Post
01/30/18, 01:23 AM   #1
manavortex
 
manavortex's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 138
Question [outdated] could GetCollectibleNickname return nil instead of ""?

Hey there,

could GetCollectibleNickname(collectibleId) return nil instead of an empty string, or would that break the UI?
it's far more convenient to write
Lua Code:
  1. local name = GetCollectibleNickname(collectibleId) or GetCollectibleName(collectibleId)
instead of
Lua Code:
  1. local name = GetCollectibleNickname(collectibleId)
  2. if name == "" then GetCollectibleName(collectibleId) end