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

Fix for #410 #415

Merged
merged 1 commit into from
Aug 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/directives/formly-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,11 +653,11 @@ function formlyField($http, $q, $compile, $templateCache, $interpolate, formlyCo
}

function runApiCheckForType(apiCheck, apiCheckInstance, apiCheckFunction, apiCheckOptions, options) {
/* eslint complexity:[2, 8] */
/* eslint complexity:[2, 9] */
if (!apiCheck) {
return;
}
const instance = apiCheckInstance || formlyApiCheck;
const instance = apiCheckInstance || formlyConfig.extras.apiCheckInstance || formlyApiCheck;
if (instance.config.disabled || apiCheckFactory.globalConfig.disabled) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/directives/formly-field.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ describe('formly-field', function() {
});
});

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