fix(steps): do not throw if there is no step
This commit is contained in:
parent
10ebfef708
commit
332c16715f
2 changed files with 8 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ export class LionSteps extends ObserverMixin(LionLitElement) {
|
||||||
hasInitial = true;
|
hasInitial = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!hasInitial) {
|
if (!hasInitial && this.steps[0]) {
|
||||||
this.steps[0].enter();
|
this.steps[0].enter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,13 @@ async function checkWorkflow(steps, expected) {
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('lion-steps', () => {
|
describe('lion-steps', () => {
|
||||||
|
it('can be instantiated', async () => {
|
||||||
|
const el = await fixture(html`
|
||||||
|
<lion-steps> </lion-steps>
|
||||||
|
`);
|
||||||
|
expect(el).to.be.a('HTMLElement');
|
||||||
|
});
|
||||||
|
|
||||||
it('has "steps" getter that returns default slot elements', async () => {
|
it('has "steps" getter that returns default slot elements', async () => {
|
||||||
const el = await fixture(html`
|
const el = await fixture(html`
|
||||||
<lion-steps>
|
<lion-steps>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue