Comparing version 4.0.0 to 4.0.1
# Changelog | ||
## `4.0.1` | ||
- Allow a default primary key if model didn't return a class | ||
## `4.0.0` | ||
@@ -7,3 +11,2 @@ | ||
## `3.0.5` | ||
@@ -10,0 +13,0 @@ |
@@ -56,3 +56,3 @@ import Base from './Base'; | ||
[key: string]: any; | ||
}) => T; | ||
}) => T | null; | ||
/** | ||
@@ -59,0 +59,0 @@ * Returns a JSON representation |
@@ -569,2 +569,4 @@ 'use strict'; | ||
var ModelClass = this.model(); | ||
if (!ModelClass) | ||
return DEFAULT_PRIMARY; | ||
return (new ModelClass()).primaryKey; | ||
@@ -571,0 +573,0 @@ }, |
{ | ||
"name": "mobx-rest", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "REST conventions for mobx.", | ||
@@ -5,0 +5,0 @@ "jest": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69534
1267