aloha-vue 1.0.60 → 1.0.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/AGet/AGet.js +9 -5
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.60",
4
+ "version": "1.0.61",
5
5
  "author": "Ilia Brykin",
6
6
  "scripts": {
7
7
  "build-icons": "node scriptsNode/iconsSvgToJs.js bootstrap3 && node scriptsNode/iconsSvgToJs.js bootstrap-1-9-1"
package/src/AGet/AGet.js CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  get,
11
11
  isArray,
12
12
  isFunction,
13
+ isNil,
13
14
  isUndefined,
14
15
  } from "lodash-es";
15
16
 
@@ -92,18 +93,21 @@ export default {
92
93
  },
93
94
  computed: {
94
95
  valueLocal() {
95
- const VALUE = get(this.data, this.pathLocal, this.defaultValue);
96
- if (this.isValueEqualsWithValueThenDefaultValue(VALUE)) {
96
+ let value = get(this.data, this.pathLocal);
97
+ if (isNil(value)) {
98
+ value = this.defaultValue;
99
+ }
100
+ if (this.isValueEqualsWithValueThenDefaultValue(value)) {
97
101
  return this.defaultValue;
98
102
  }
99
103
  if (this.filter) {
100
104
  const FILTER_FUNCTION_NAME = `filter${ capitalize(this.filter) }`;
101
105
  if (isFunction(this[FILTER_FUNCTION_NAME])) {
102
- return this[FILTER_FUNCTION_NAME](VALUE, this.filterParameters);
103
- }
106
+ return this[FILTER_FUNCTION_NAME](value, this.filterParameters);
107
+ }
104
108
  console.warn(`filter "${ FILTER_FUNCTION_NAME }" ist not defined`);
105
109
  }
106
- return VALUE;
110
+ return value;
107
111
  },
108
112
 
109
113
  pathLocal() {