Different responses between TenantConfig.get and TenantConfig.config

#1

Both TenantConfig.get action and TenantConfig.config action return TenantConfig obj.

However, if the object doesn’t exist, the return value are different. TenantConfig.get returns null whereas TenantConfig.config returns {}.

Also, the console automatically add {versionEdits: Array[0], userUpdatedFields: Array[0]} into the response of TenantConfig.config, as following show,

>> TenantConfig.get('fake') 
>> null
>> TenantConfig.config('fake')
>> Object {versionEdits: Array[0], userUpdatedFields: Array[0]}

My questions are

  1. why responses are different given that they both return TenantConfig obj
  2. why console automatically add versionEdits and userUpdatedFields into response of TenantConfig.config

P.S.,below is a screenshot of the console

0 Likes