mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
Make sure icon is json (#2245)
One slipped as seen in #2243 MUST be merged after #2243
This commit is contained in:
parent
32179a120f
commit
d639854843
|
@ -82,7 +82,12 @@ private fun createOutputFiles() {
|
||||||
.forEach { iconLocation ->
|
.forEach { iconLocation ->
|
||||||
|
|
||||||
val jsonData = Klaxon().parseJsonArray(iconLocation.reader())
|
val jsonData = Klaxon().parseJsonArray(iconLocation.reader())
|
||||||
val iconName = iconLocation.toString().replace("../_data/icons/", "").replace(".json", "")
|
|
||||||
|
if (iconLocation.extension != "json") {
|
||||||
|
error("Icon must be json " + iconLocation)
|
||||||
|
}
|
||||||
|
|
||||||
|
val iconName = iconLocation.toString().removePrefix("../_data/icons/").removeSuffix(".json")
|
||||||
|
|
||||||
val iconJson = JsonObject()
|
val iconJson = JsonObject()
|
||||||
iconJson["name"] = iconName
|
iconJson["name"] = iconName
|
||||||
|
|
Loading…
Reference in New Issue
Block a user