diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-10-30 14:27:15 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-11-05 20:51:41 +0100 |
commit | 82ff32a71094898454a2b9f269b1a306d5afd4a8 (patch) | |
tree | fe74d0403aafe3fb5eb45249c9956e477296b163 /components/script/dom/node.rs | |
parent | 026b5e34eaabc572858f1c7de668eacb4ab84c3f (diff) | |
download | servo-82ff32a71094898454a2b9f269b1a306d5afd4a8.tar.gz servo-82ff32a71094898454a2b9f269b1a306d5afd4a8.zip |
Pass the correct argument to Element::create when cloning.
The current code calls as_slice() on the Option, yielding &[DOMString], and
then calls to_string, yielding "[prefix]".
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 938404bdc37..c1b3ffc7980 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -1516,7 +1516,7 @@ impl Node { local: element.local_name().clone() }; let element = Element::create(name, - Some(element.prefix().as_slice().to_string()), *document, ScriptCreated); + element.prefix().as_ref().map(|p| p.as_slice().to_string()), *document, ScriptCreated); NodeCast::from_temporary(element) }, TextNodeTypeId => { |