From 74fe47b4087db2afee390fe793628aec2ff0676b Mon Sep 17 00:00:00 2001 From: Yuta Hiroto Date: Wed, 19 Sep 2018 01:18:29 +0900 Subject: [PATCH] allow empty string in meta (#2027) fixes #1714 --- packages/core/parcel-bundler/src/assets/HTMLAsset.js | 7 ++++++- .../core/parcel-bundler/test/integration/html/index.html | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/core/parcel-bundler/src/assets/HTMLAsset.js b/packages/core/parcel-bundler/src/assets/HTMLAsset.js index 81ace3252cf..89a2b5dff50 100644 --- a/packages/core/parcel-bundler/src/assets/HTMLAsset.js +++ b/packages/core/parcel-bundler/src/assets/HTMLAsset.js @@ -137,7 +137,12 @@ class HTMLAsset extends Asset { if ( !Object.keys(node.attrs).some(attr => { let values = META[attr]; - return values && values.includes(node.attrs[attr]); + + return ( + values && + values.includes(node.attrs[attr]) && + node.attrs.content !== '' + ); }) ) { return node; diff --git a/packages/core/parcel-bundler/test/integration/html/index.html b/packages/core/parcel-bundler/test/integration/html/index.html index e5a060f2f22..1700b1dbf3b 100644 --- a/packages/core/parcel-bundler/test/integration/html/index.html +++ b/packages/core/parcel-bundler/test/integration/html/index.html @@ -1,9 +1,14 @@ + + + + +

Hello world

Linking to another page

@@ -15,4 +20,5 @@

Hello world

hello world +