We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8178536 + 1e0fbe4 commit c80d26dCopy full SHA for c80d26d
src/index.jsx
@@ -1,8 +1,11 @@
1
import PropTypes from 'prop-types';
2
import React, { useEffect, useRef } from 'react';
3
4
-const removeNullOrEmpty = (obj) => Object.fromEntries(Object.entries(obj).filter(([_, v]) => v != null && v !== ''));
5
-
+const removeNullOrEmpty = (obj) => {
+ const o = {};
6
+ Object.keys(obj).forEach((key) => obj[key] !== null && obj[key] !== '' && (o[key] = obj[key]));
7
+ return o;
8
+};
9
const WidgetContainer = ({ attrs }) => <div className="OUTBRAIN" {...attrs} />;
10
11
const OutbrainWidget = React.memo(({
0 commit comments