Open Chopinsky opened 4 years ago
This PR is to address the exception being thrown if the target html file contains link tags whose type attribute is defined but without a value.
link
type
For example, when using the plugin with webpack, encountering the following link tag:
<link href="https://somecdn.com/favicon/favicon.png" rel="icon" type>
in a html file will crash the build process because of this exception: TypeError: Cannot read property 'toLowerCase' of undefined.
TypeError: Cannot read property 'toLowerCase' of undefined
With this fix, we will treat the undefined attribute value as a blank string value, i.e. it will be equivalent as the link tag below:
<link href="https://somecdn.com/favicon/favicon.png" rel="icon" type="">.
<link href="https://somecdn.com/favicon/favicon.png" rel="icon" type="">
This PR is to address the exception being thrown if the target html file contains
link
tags whosetype
attribute is defined but without a value.For example, when using the plugin with webpack, encountering the following
link
tag:<link href="https://somecdn.com/favicon/favicon.png" rel="icon" type>
in a html file will crash the build process because of this exception:
TypeError: Cannot read property 'toLowerCase' of undefined
.With this fix, we will treat the undefined attribute value as a blank string value, i.e. it will be equivalent as the
link
tag below:<link href="https://somecdn.com/favicon/favicon.png" rel="icon" type="">
.