mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
fix unquote string
This commit is contained in:
@@ -1659,8 +1659,9 @@ const do_deduce_fn_names = (node, parent) => {
|
||||
name = parent.name_node.value
|
||||
}
|
||||
} else if(parent?.type == 'key_value_pair') {
|
||||
// unwrap quotes with JSON.parse
|
||||
name = JSON.parse(parent.key.value)
|
||||
const str = parent.key.value
|
||||
// unwrap quotes
|
||||
name = str.substr(1, str.length - 2)
|
||||
} else {
|
||||
name = 'anonymous'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user