Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,12 @@ export function getCustomComponentDefinitionDetails (def) {
}

export function getCustomFunctionDetails (func) {
const string = Function.prototype.toString.call(func) || ''
let string = ''
try {
string = Function.prototype.toString.call(func)
} catch (e) {
// Func is probably a Proxy, which can break Function.prototype.toString()
}
const matches = string.match(/\(.*\)/)
const args = matches ? matches[0] : '(?)'
return {
Expand Down