Skip to content

Commit 30b6965

Browse files
authored
set watch option as flush: 'post'
in some cases useTitle doesn't work . it has to work in nextick https://codepen.io/yjl626/pen/rNyKVZW vuejs/core#2730 set watch option as flush: 'post' can fixed it I think it's a reliable option in this function
1 parent 197a2ae commit 30b6965

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/useTitle/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ export function useTitle(
3535
if (isString(t) && t !== o && document)
3636
document.title = t
3737
},
38-
{ immediate: true },
38+
{
39+
immediate: true ,
40+
flush: 'post'
41+
},
3942
)
4043

4144
if (observe && document) {

0 commit comments

Comments
 (0)