UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

25 lines (24 loc) 594 B
import r from "../managers/braze-instance.js"; import i from "./banner-provider-factory.js"; import { getAllBanners } from "./get-all-banners.js"; export function subscribeToBannersUpdates(n) { var o; if (!r.rr()) return; const t = i.m(); if (t.It()) { const r = getAllBanners(); r && "function" == typeof n && n(r); } const s = t.qt(n); if (!t.Ct()) { const n = null === (o = r.nn()) || void 0 === o ? void 0 : o.rn(() => { const n = t.ht(); n && n.length > 0 && t.$(n); }); n && t.Tt(n); } return s; }