promotionUpdated()

in frontend/src/controllers/PreviewPromotionController.es6 [14:26]


    promotionUpdated(promotion, isValid) {
        if (!promotion || !isValid) {
            return;
        }

        if (this.currentTimeout) {
            this.$timeout.cancel(this.currentTimeout);
        }
        
        this.currentTimeout = this.$timeout(() => {
            this.$scope.promotionString = JSON.stringify(promotion);
        }, 500)
    }