Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Commit cb0bca3

Browse files
committed
Fix for #410
1 parent fec4f6e commit cb0bca3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/directives/formly-field.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,11 +653,11 @@ function formlyField($http, $q, $compile, $templateCache, $interpolate, formlyCo
653653
}
654654

655655
function runApiCheckForType(apiCheck, apiCheckInstance, apiCheckFunction, apiCheckOptions, options) {
656-
/* eslint complexity:[2, 8] */
656+
/* eslint complexity:[2, 9] */
657657
if (!apiCheck) {
658658
return;
659659
}
660-
const instance = apiCheckInstance || formlyApiCheck;
660+
const instance = apiCheckInstance || formlyConfig.extras.apiCheckInstance || formlyApiCheck;
661661
if (instance.config.disabled || apiCheckFactory.globalConfig.disabled) {
662662
return;
663663
}

src/directives/formly-field.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ describe('formly-field', function() {
732732
});
733733
});
734734

735-
describe.skip(`formlyConfig.extras.apiCheckInstance`, () => {
735+
describe(`formlyConfig.extras.apiCheckInstance`, () => {
736736
it(`should default to this instance when specified and no specific type instance is specified`, () => {
737737
const globalApiCheckInstance = apiCheck({
738738
output: {prefix: 'custom-api-check'}

0 commit comments

Comments
 (0)