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.o(); if (t.Ct()) { const r = getAllBanners(); r && "function" == typeof n && n(r); } const s = t.St(n); if (!t.jt()) { const n = null === (o = r.nn()) || void 0 === o ? void 0 : o.rn(() => { const n = t.et(); n && n.length > 0 && t.M(n); }); n && t.yt(n); } return s; }