Commit 6d5d1a9 1 parent 8daf5ce commit 6d5d1a9 Copy full SHA for 6d5d1a9
File tree 3 files changed +10
-8
lines changed
Composer/packages/lib/indexers/src/validations/expressionValidation
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,12 @@ export const validateExpressions: ValidateFunc = (
49
49
let errorMessage = '' ;
50
50
let warningMessage = '' ;
51
51
try {
52
- //the cacheKey adds the type of the value at the end, this allows a new indexing system to prevent the overwriting in cache
53
- const cacheKey = types . length > 1 ? value : `${ value } .${ types [ 0 ] } ` ;
54
- newCache [ cacheKey ] = cache ?. [ cacheKey ] ? cache [ cacheKey ] : checkExpression ( value , required , types ) ;
55
- errorMessage = checkReturnType ( newCache [ cacheKey ] , types ) ;
52
+ const valueToValidate = cache ?. [ path ] ? cache [ path ] : checkExpression ( value , required , types )
53
+ errorMessage = checkReturnType ( valueToValidate , types ) ;
54
+ if ( ! errorMessage ) {
55
+ //First validate that the types of the value match and then store the type value in newCache using the path as key to avoid overwriting.
56
+ newCache [ path ] = valueToValidate ;
57
+ }
56
58
} catch ( error ) {
57
59
//change the missing custom function error to warning
58
60
warningMessage = filterCustomFunctionError ( error . message , customFunctions ) ;
Original file line number Diff line number Diff line change @@ -1896,7 +1896,7 @@ __metadata:
1896
1896
1897
1897
"@bfc/indexers@file:../../Composer/packages/lib/indexers::locator=azurePublish%40workspace%3A.":
1898
1898
version: 0.0.0
1899
- resolution: "@bfc/indexers@file:../../Composer/packages/lib/indexers#../../Composer/packages/lib/indexers::hash=99ba57 &locator=azurePublish%40workspace%3A."
1899
+ resolution: "@bfc/indexers@file:../../Composer/packages/lib/indexers#../../Composer/packages/lib/indexers::hash=52caad &locator=azurePublish%40workspace%3A."
1900
1900
dependencies:
1901
1901
"@microsoft/bf-lu": 4.15.0-dev.20210702.cbf708d
1902
1902
adaptive-expressions: ^4.18.0
@@ -1905,7 +1905,7 @@ __metadata:
1905
1905
tslib: 2.4.0
1906
1906
peerDependencies:
1907
1907
"@bfc/shared": "*"
1908
- checksum: 5a2aab3716adf348a98496dd60f07dacb492f8d4e5e393b6cee28d0f39ae5291f5985c4e64f549dde184ec3d49a4a531c1963de19278b89497966fd2fce4373f
1908
+ checksum: 1e0e72e94ee93ca43e97cf7d4a4bad2ac9bddd32308c4c596966c1fda9ae712812ba27c2f76f72efae37160d04d1a349fbe09bc889a3858e52e493b77f7e1a5a
1909
1909
languageName: node
1910
1910
linkType: hard
1911
1911
Original file line number Diff line number Diff line change @@ -1936,7 +1936,7 @@ __metadata:
1936
1936
1937
1937
"@bfc/indexers@file:../../Composer/packages/lib/indexers::locator=azure-publish-new%40workspace%3A.":
1938
1938
version: 0.0.0
1939
- resolution: "@bfc/indexers@file:../../Composer/packages/lib/indexers#../../Composer/packages/lib/indexers::hash=99ba57 &locator=azure-publish-new%40workspace%3A."
1939
+ resolution: "@bfc/indexers@file:../../Composer/packages/lib/indexers#../../Composer/packages/lib/indexers::hash=52caad &locator=azure-publish-new%40workspace%3A."
1940
1940
dependencies:
1941
1941
"@microsoft/bf-lu": 4.15.0-dev.20210702.cbf708d
1942
1942
adaptive-expressions: ^4.18.0
@@ -1945,7 +1945,7 @@ __metadata:
1945
1945
tslib: 2.4.0
1946
1946
peerDependencies:
1947
1947
"@bfc/shared": "*"
1948
- checksum: 5a2aab3716adf348a98496dd60f07dacb492f8d4e5e393b6cee28d0f39ae5291f5985c4e64f549dde184ec3d49a4a531c1963de19278b89497966fd2fce4373f
1948
+ checksum: 1e0e72e94ee93ca43e97cf7d4a4bad2ac9bddd32308c4c596966c1fda9ae712812ba27c2f76f72efae37160d04d1a349fbe09bc889a3858e52e493b77f7e1a5a
1949
1949
languageName: node
1950
1950
linkType: hard
1951
1951
You can’t perform that action at this time.
0 commit comments