mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
fix: should handle zero variants
This commit is contained in:
parent
7c0bb12799
commit
735b11297c
@ -177,27 +177,9 @@ exports[`renders correctly with without variants 1`] = `
|
|||||||
</code>
|
</code>
|
||||||
method in the Client SDK.
|
method in the Client SDK.
|
||||||
</p>
|
</p>
|
||||||
<table
|
<p>
|
||||||
className="mdl-data-table mdl-shadow--2dp variantTable"
|
No variants defined.
|
||||||
>
|
</p>
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Variant name
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
className="labels"
|
|
||||||
/>
|
|
||||||
<th>
|
|
||||||
Weight
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
className="actions"
|
|
||||||
/>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody />
|
|
||||||
</table>
|
|
||||||
<br />
|
<br />
|
||||||
<p>
|
<p>
|
||||||
<a
|
<a
|
||||||
@ -234,27 +216,9 @@ exports[`renders correctly with without variants and no permissions 1`] = `
|
|||||||
</code>
|
</code>
|
||||||
method in the Client SDK.
|
method in the Client SDK.
|
||||||
</p>
|
</p>
|
||||||
<table
|
<p>
|
||||||
className="mdl-data-table mdl-shadow--2dp variantTable"
|
No variants defined.
|
||||||
>
|
</p>
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Variant name
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
className="labels"
|
|
||||||
/>
|
|
||||||
<th>
|
|
||||||
Weight
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
className="actions"
|
|
||||||
/>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody />
|
|
||||||
</table>
|
|
||||||
<br />
|
<br />
|
||||||
</section>
|
</section>
|
||||||
`;
|
`;
|
||||||
|
@ -88,7 +88,7 @@ class UpdateVariantComponent extends Component {
|
|||||||
<code style={{ color: 'navy' }}>getVariant()</code> method in the Client SDK.
|
<code style={{ color: 'navy' }}>getVariant()</code> method in the Client SDK.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{this.renderVariants(variants)}
|
{variants.length > 0 ? this.renderVariants(variants) : <p>No variants defined.</p>}
|
||||||
<br />
|
<br />
|
||||||
{this.props.hasPermission(UPDATE_FEATURE) ? (
|
{this.props.hasPermission(UPDATE_FEATURE) ? (
|
||||||
<p>
|
<p>
|
||||||
|
Loading…
Reference in New Issue
Block a user