@api-components/amf-helper-mixin
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -216,5 +216,9 @@ /** | ||
set amf(value) { | ||
const old = this._amf; | ||
this._amf = value; | ||
this.__modelVersion = this.__detectModelVersion(value); | ||
this.__amfChanged(value); | ||
if (this.requestUpdate) { | ||
this.requestUpdate('amf', old); | ||
} | ||
} | ||
@@ -240,8 +244,8 @@ | ||
__detectModelVersion(model) { | ||
if (model instanceof Array) { | ||
model = model[0]; | ||
} | ||
if (!model) { | ||
return 0; | ||
} | ||
if (model instanceof Array) { | ||
model = model[0]; | ||
} | ||
const ctx = model['@context']; | ||
@@ -248,0 +252,0 @@ let versionString; |
@@ -479,1 +479,15 @@ <a name="2.0.11"></a> | ||
## [3.1.2](https://github.com/advanced-rest-client/amf-helper-mixin/compare/3.0.2...3.1.2) (2019-08-23) | ||
### Bug Fixes | ||
* fixing linter error ([73c0cce](https://github.com/advanced-rest-client/amf-helper-mixin/commit/73c0cce)) | ||
### Features | ||
* adding `__amfChanged` cllaback for amf setter ([e0bf834](https://github.com/advanced-rest-client/amf-helper-mixin/commit/e0bf834)) | ||
{ | ||
"name": "@api-components/amf-helper-mixin", | ||
"description": "A mixin with common functions user by most AMF components to compyte AMF values", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "main": "amf-helper-mixin.js", |
95810
1668