don't drop the value when it equals to None

(cherry picked from commit 2abf8a0e8b)
This commit is contained in:
Augustin Husson
2018-11-12 11:51:30 +01:00
committed by bergquist
parent a23780ddf0
commit 82bf655ec1
@@ -28,7 +28,7 @@ export class TemplateSrv {
const existsOrEmpty = value => value || value === '';
this.index = this.variables.reduce((acc, currentValue) => {
if (currentValue.current && !currentValue.current.isNone && existsOrEmpty(currentValue.current.value)) {
if (currentValue.current && (currentValue.current.isNone || existsOrEmpty(currentValue.current.value))) {
acc[currentValue.name] = currentValue;
}
return acc;