fix: addが正常に追加されていない問題を修正

This commit is contained in:
usbharu 2023-03-24 18:34:03 +09:00
parent 081be4e305
commit 4e613c4590
1 changed files with 3 additions and 2 deletions

View File

@ -13,8 +13,9 @@ open class Object : JsonLd {
companion object { companion object {
@JvmStatic @JvmStatic
protected fun add(list:List<String>,type:String):List<String> { protected fun add(list:List<String>,type:String):List<String> {
list.toMutableList().add(type) val toMutableList = list.toMutableList()
return list.distinct() toMutableList.add(type)
return toMutableList.distinct()
} }
} }
} }