8000 Fix b-time hydration error · siberfx/bootstrap-vue@440462c · GitHub
[go: up one dir, main page]

Skip to content

Commit 440462c

Browse files
CyberAPxanf
authored andcommitted
Fix b-time hydration error
Since AM\PM spinner depends on client's setting it shouldn't be rendered on server.
1 parent 58516a4 commit 440462c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/time/time.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,8 @@ export const BTime = /*#__PURE__*/ extend({
504504
}
505505

506506
// AM/PM ?
507-
if (this.is12Hour) {
507+
// depends on client settings, shouldn't be rendered on server
508+
if (this.isLive && this.is12Hour) {
508509
// TODO:
509510
// If locale is RTL, unshift this instead of push?
510511
// And switch class `ml-2` to `mr-2`

0 commit comments

Comments
 (0)
0