             variants = [product.masterVariant].concat(product.variants)
             match = _.find variants, (v) ->
               v.sku is masterSku
-            if match
+            if match?
               data =
                 productId: product.id
                 productVersion: product.version

        version: variantDataInMaster.productVersion
        variantId: variantDataInMaster.productId
        actions: actions

      @masterClient.products.byId(variantDataInMaster.productId).save(data)
      .then ->

    deferred.promise

  _filterPrices: (retailerVariant, variantInMaster, retailerCustomerGroup, masterCustomerGroup, retailerChannel) ->
    retailerPrices = _.select retailerVariant.prices, (price) ->
      not _.has(price, 'customerGroup') or price.customerGroup.id is retailerCustomerGroup.id

