diff --git a/src/utils/proxy/validate-widget-data.js b/src/utils/proxy/validate-widget-data.js index 57adc9429..e81606ef8 100644 --- a/src/utils/proxy/validate-widget-data.js +++ b/src/utils/proxy/validate-widget-data.js @@ -2,10 +2,8 @@ import widgets from "widgets/widgets"; export default function validateWidgetData(widget, endpoint, data) { let valid = true; - let dataParsed; - if (typeof data === 'object') { - dataParsed = data; - } else { + let dataParsed = data; + if (Buffer.isBuffer(data)) { try { dataParsed = JSON.parse(data); } catch (e) {