2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-19 14:40:33 +03:00

fix: also use ssrAppId for client update

This commit is contained in:
pimlie
2019-07-16 10:49:19 +02:00
parent b0c85e5301
commit 50c05090ae
+2 -2
View File
@@ -17,7 +17,7 @@ function getTag (tags, tag) {
* @param {Object} newInfo - the meta info to update to
*/
export default function updateClientMetaInfo (appId, options = {}, newInfo) {
const { ssrAttribute } = options
const { ssrAttribute, ssrAppId } = options
// only cache tags for current update
const tags = {}
@@ -25,7 +25,7 @@ export default function updateClientMetaInfo (appId, options = {}, newInfo) {
const htmlTag = getTag(tags, 'html')
// if this is a server render, then dont update
if (appId === 'ssr' && htmlTag.hasAttribute(ssrAttribute)) {
if (appId === ssrAppId && htmlTag.hasAttribute(ssrAttribute)) {
// remove the server render attribute so we can update on (next) changes
htmlTag.removeAttribute(ssrAttribute)
return false