Skip to content

Commit 4db0537

Browse files
committed
Use if
1 parent 46e56bf commit 4db0537

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

xmlua/document.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,11 @@ do -- C14N methods
314314
function methods:canonicalize(select, opts)
315315
select = select or {} -- default to include all nodes in the output
316316
opts = opts or {}
317-
local with_comments = opts.with_comments and 1 or 0 -- default = not including comments
317+
318+
local with_comments = 0 -- default = not including comments
319+
if opts.with_comments then
320+
with_comments = 1
321+
end
318322

319323
local mode = opts.mode or DEFAULT_C14N_MODE
320324
if not C14N_MODES_LOOKUP[mode] then

0 commit comments

Comments
 (0)