mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 18:17:19 +00:00
Fix createElementFromAttrs bug (#31751)
The "false" value was not handled correctly, it would cause bugs in the future (fortunately, this behavior is not used in code yet).
This commit is contained in:
@ -10,7 +10,9 @@ test('createElementFromAttrs', () => {
|
||||
class: 'cls-1 cls-2',
|
||||
'data-foo': 'the-data',
|
||||
disabled: true,
|
||||
checked: false,
|
||||
required: null,
|
||||
tabindex: 0,
|
||||
});
|
||||
expect(el.outerHTML).toEqual('<button id="the-id" class="cls-1 cls-2" data-foo="the-data" disabled=""></button>');
|
||||
expect(el.outerHTML).toEqual('<button id="the-id" class="cls-1 cls-2" data-foo="the-data" disabled="" tabindex="0"></button>');
|
||||
});
|
||||
|
Reference in New Issue
Block a user