Fix discover not using an index pattern when 2 are created (#38053) (#38163)

This commit is contained in:
Wylie Conlon 2019-06-06 10:00:42 -04:00 committed by GitHub
parent 7d3cf7bc02
commit 77dd34b1b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,8 +85,8 @@ export default function (opts) {
}
if (!defined) {
// If there is only one index pattern, set it as default
if (patterns.length === 1) {
// If there is any index pattern created, set the first as default
if (patterns.length >= 1) {
defaultId = patterns[0];
config.set('defaultIndex', defaultId);
} else {