| Index: third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
|
| index 218ea266c83254a97530a771d2684d4d49b9f96d..e28f864e91500a3708e770445b4de74d6db49d60 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
|
| @@ -72,10 +72,11 @@ HTMLOptionElement* HTMLOptionElement::CreateForJSConstructor(
|
| ExceptionState& exception_state) {
|
| HTMLOptionElement* element = new HTMLOptionElement(document);
|
| element->EnsureUserAgentShadowRoot();
|
| - element->AppendChild(Text::Create(document, data.IsNull() ? "" : data),
|
| - exception_state);
|
| - if (exception_state.HadException())
|
| - return nullptr;
|
| + if (!data.IsEmpty()) {
|
| + element->AppendChild(Text::Create(document, data), exception_state);
|
| + if (exception_state.HadException())
|
| + return nullptr;
|
| + }
|
|
|
| if (!value.IsNull())
|
| element->setValue(value);
|
|
|