New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

alaska-field-relationship

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alaska-field-relationship - npm Package Compare versions

Comparing version 0.11.0 to 0.11.2

30

index.js

@@ -29,3 +29,3 @@ // @flow

model: string;
ref: void| Class<Alaska$Model>;
ref: void | Class < Alaska$Model > ;
optional: boolean;

@@ -112,16 +112,18 @@

let field = this;
schema.pre('save', function (next) {
let record = this;
if (!record.isModified(field.path)) {
if (ref === model) {
let field = this;
schema.pre('save', function (next) {
let record = this;
if (!record.isModified(field.path)) {
next();
return;
}
let id = record.id;
if (id && String(id) === String(record.get(field.path))) {
next(new Error('Can not relate to record self, ' + model.path + '#' + field.path));
return;
}
next();
return;
}
let id = record.id;
if (id && String(id) === String(record.get(field.path))) {
next(new Error('Can not relate to record self, ' + model.path + '#' + field.path));
return;
}
next();
});
});
}
}

@@ -128,0 +130,0 @@

{
"name": "alaska-field-relationship",
"version": "0.11.0",
"version": "0.11.2",
"description": "Alaska relationship field",

@@ -5,0 +5,0 @@ "keywords": [

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