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..7c0eb3c87b142b662cbde98b03eec9f0bacb676c 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp |
@@ -72,8 +72,8 @@ HTMLOptionElement* HTMLOptionElement::CreateForJSConstructor( |
ExceptionState& exception_state) { |
HTMLOptionElement* element = new HTMLOptionElement(document); |
element->EnsureUserAgentShadowRoot(); |
- element->AppendChild(Text::Create(document, data.IsNull() ? "" : data), |
- exception_state); |
+ if (!data.IsNull()) |
foolip
2017/05/17 11:23:12
The spec says "If text is not the empty string, th
Shanmuga Pandi
2017/05/17 11:29:35
I understood. I will wait for the automatic import
|
+ element->AppendChild(Text::Create(document, data), exception_state); |
if (exception_state.HadException()) |
return nullptr; |