Skip to content

Commit

Permalink
Use isNonEmptyArray util
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsnyder committed Oct 19, 2023
1 parent 6bcaeb1 commit 0019f4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Personalization/createComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { noop, flatMap } from "../../utils";
import { noop, flatMap, isNonEmptyArray } from "../../utils";
import createPersonalizationDetails from "./createPersonalizationDetails";
import { AUTHORING_ENABLED } from "./constants/loggerMessage";
import validateApplyPropositionsOptions from "./validateApplyPropositionsOptions";
Expand Down Expand Up @@ -103,7 +103,7 @@ export default ({
// We only want to call mergeDecisionsMeta once, but we can get the propositions
// from two places: the pending display notifications and the view change handler.
const decisionsMeta = flatMap(decisionsMetas, dms => dms);
if (decisionsMeta.length > 0) {
if (isNonEmptyArray(decisionsMeta)) {
mergeDecisionsMeta(
event,
decisionsMeta,
Expand Down

0 comments on commit 0019f4f

Please sign in to comment.