Sha256: c457f14f2aefeea73c51d4997a535e957657c1c4db600910a5ce5403c50750d3

Contents?: true

Size: 413 Bytes

Versions: 11

Compression:

Stored size: 413 Bytes

Contents

SolidusBraintree.PromiseShim = {
  convertBraintreePromise: function(fn, args, context) {
    var jqPromise  = $.Deferred();

    args = args || [];
    context = context || this;

    args = args.concat(function(error, data) {
      if (error) {
        jqPromise.reject(error);
      } else {
        jqPromise.resolve(data);
      }
    });

    fn.apply(context, args);

    return jqPromise.promise();
  }
}

Version data entries

11 entries across 6 versions & 1 rubygems

Version Path
solidus_braintree-3.3.0 app/assets/javascripts/spree/backend/solidus_braintree/promise.js
solidus_braintree-3.3.0 lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/promise.js
solidus_braintree-3.2.0 lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/promise.js
solidus_braintree-3.2.0 app/assets/javascripts/spree/backend/solidus_braintree/promise.js
solidus_braintree-3.1.0 app/assets/javascripts/spree/backend/solidus_braintree/promise.js
solidus_braintree-3.1.0 lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/promise.js
solidus_braintree-3.0.1 lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/promise.js
solidus_braintree-3.0.1 app/assets/javascripts/spree/backend/solidus_braintree/promise.js
solidus_braintree-3.0.0 lib/generators/solidus_braintree/install/templates/app/assets/javascripts/spree/frontend/solidus_braintree/promise.js
solidus_braintree-3.0.0 app/assets/javascripts/spree/backend/solidus_braintree/promise.js
solidus_braintree-2.0.0 app/assets/javascripts/solidus_braintree/promise.js