Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ampersand-sync

Package Overview
Dependencies
Maintainers
4
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand-sync - npm Package Compare versions

Comparing version 3.0.6 to 3.0.7

20

ampersand-sync.js

@@ -113,13 +113,15 @@ /*$AMPERSAND_VERSION*/

var request = options.xhr = options.xhrImplementation(ajaxSettings, function (err, resp, body) {
if (err && options.error) return options.error(resp, 'error', err.message);
// Parse body as JSON if a string.
if (body && typeof body === 'string') {
try {
body = JSON.parse(body);
} catch (err) {
if (options.error) return options.error(resp, 'error', err.message);
if (err) {
if (options.error) return options.error(resp, 'error', err.message);
} else {
// Parse body as JSON if a string.
if (body && typeof body === 'string') {
try {
body = JSON.parse(body);
} catch (err) {
if (options.error) return options.error(resp, 'error', err.message);
}
}
if (options.success) return options.success(body, 'success', resp);
}
if (options.success) return options.success(body, 'success', resp);
});

@@ -126,0 +128,0 @@ model.trigger('request', model, request, options, ajaxSettings);

{
"name": "ampersand-sync",
"description": "Provides sync behavior for updating data from ampersand models and collections to the server.",
"version": "3.0.6",
"version": "3.0.7",
"author": "Henrik Joreteg <henrik@andyet.net>",

@@ -6,0 +6,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc