Comparing version 0.7.0 to 0.7.1
@@ -0,1 +1,5 @@ | ||
# 0.7.1 | ||
* Catch errors during `hasModelOptions` in-case a non-object is given to `reflect-metadata` | ||
# 0.7.0 | ||
@@ -2,0 +6,0 @@ |
@@ -58,3 +58,8 @@ "use strict"; | ||
function hasModelOptions(ctor) { | ||
return Reflect.hasMetadata(exports.MODEL_OPTIONS_META_KEY, ctor.prototype); | ||
try { | ||
return Reflect.hasMetadata(exports.MODEL_OPTIONS_META_KEY, ctor.prototype); | ||
} | ||
catch (err) { | ||
return false; | ||
} | ||
} | ||
@@ -61,0 +66,0 @@ exports.hasModelOptions = hasModelOptions; |
{ | ||
"name": "modelsafe", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "bugs": "https://github.com/creativecuriositystudio/modelsafe/issues", |
@@ -60,3 +60,7 @@ /* tslint:disable:ban-types */ | ||
export function hasModelOptions(ctor: Function): boolean { | ||
return Reflect.hasMetadata(MODEL_OPTIONS_META_KEY, ctor.prototype); | ||
try { | ||
return Reflect.hasMetadata(MODEL_OPTIONS_META_KEY, ctor.prototype); | ||
} catch (err) { | ||
return false; | ||
} | ||
} | ||
@@ -63,0 +67,0 @@ |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
158779
2704
1