function resolveWrapper(img, data) {
        if (resolve === reject) {
          // Not using Promises
          if (resolve) resolve(img, data)
          return
        } else if (img instanceof Error) {
          reject(img)
          return
        }
        data = data || {} // eslint-disable-line no-param-reassign
        data.image = img
        resolve(data)
      }
Callback for the fetchBlob call.

@param {HTMLImageElement|HTMLCanvasElement} img Error object
@param {object} data Data object
@returns {undefined} Undefined