File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,12 @@ pub const Node = struct {
178
178
179
179
pub fn _lookupPrefix (self : * parser.Node , namespace : ? []const u8 ) ? []const u8 {
180
180
// TODO: other is not an optional parameter, but can be null.
181
+ if (namespace == null ) {
182
+ return null ;
183
+ }
184
+ if (std .mem .eql (u8 , namespace .? , "" )) {
185
+ return null ;
186
+ }
181
187
return parser .nodeLookupPrefix (self , namespace );
182
188
}
183
189
Original file line number Diff line number Diff line change @@ -383,15 +383,9 @@ pub fn nodeIsSameNode(node: *Node, other: *Node) bool {
383
383
return res ;
384
384
}
385
385
386
- pub fn nodeLookupPrefix (node : * Node , namespace : ? []const u8 ) ? []const u8 {
387
- if (namespace == null ) {
388
- return null ;
389
- }
390
- if (std .mem .eql (u8 , namespace .? , "" )) {
391
- return null ;
392
- }
386
+ pub fn nodeLookupPrefix (node : * Node , namespace : []const u8 ) ? []const u8 {
393
387
var s : ? * String = undefined ;
394
- _ = nodeVtable (node ).dom_node_lookup_prefix .? (node , stringFromData (namespace .? ), & s );
388
+ _ = nodeVtable (node ).dom_node_lookup_prefix .? (node , stringFromData (namespace ), & s );
395
389
if (s == null ) {
396
390
return null ;
397
391
}
You can’t perform that action at this time.
0 commit comments