fix: targeted voucher code not working

This commit is contained in:
minjaesong
2025-02-15 23:56:53 +09:00
parent ad68e04b83
commit 37d6d3004b
4 changed files with 26 additions and 10 deletions

View File

@@ -33,9 +33,11 @@ class ActorValue : KVHashMap {
hashMap = newMap
}
private fun isString(key: String) = (get(key) is String)
override fun set(key: String, value: Any) {
// check if the key exists and is a blob
if (getAsString(key.toLowerCase())?.startsWith(BLOB) == true) {
if (isString(key.toLowerCase()) && getAsString(key.toLowerCase())?.startsWith(BLOB) == true) {
throw IllegalStateException("Cannot write plain values to the blob object")
}
else