       @_resolveProductCategories(product.categories)
       @_resolveReference(@client.taxCategories, 'taxCategory', product.taxCategory, "name=\"#{product.taxCategory?.id}\"")
     ]
-    .spread (prodTypeId, prodCatsIds, taxCatId) =>
+    .spread (prodTypeId, prodCatsIds, taxCatId) ->
       if prodTypeId
         product.productType =
           id: prodTypeId

debug = require('debug')('sphere-product-sync-import')
_ = require 'underscore'
_.mixin require('underscore-mixins')
Promise = require 'bluebird'
{SphereClient, ProductSync} = require 'sphere-node-sdk'


      else
        Promise.all cats.map (cat) =>
          @_resolveReference(@client.categories, 'categories', cat, "externalId=\"#{cat.id}\"")
        .then (result) -> resolve(result.filter (c) -> c)

  _resolveReference: (service, refKey, ref, predicate) ->
    new Promise (resolve) =>
