How to use the post-robot/src.bridge.destroyBridges function in post-robot

To help you get started, we’ve selected a few post-robot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github krakenjs / zoid / src / component / component.js View on Github external
export function destroyAll() : ZalgoPromise {
    if (bridge) {
        bridge.destroyBridges();
    }

    const results = [];

    const global = getGlobal();
    global.activeComponents = global.activeComponents || [];
    while (global.activeComponents.length) {
        results.push(global.activeComponents[0].destroy(new Error(`zoid destroyed all`), false));
    }

    return ZalgoPromise.all(results).then(noop);
}