Commit ea472740 authored by Guillaume's avatar Guillaume
Browse files

When undefined border is an empty object

parent 29482f92
......@@ -728,20 +728,20 @@ class AtPage extends Handler {
addBorderVars(border, list, item) {
// variables for borders
for (let b in border) {
if (typeof border[b] !== "undefined") {
let value = border[b];
let bVar = list.createItem({
for (const name of Object.keys(border)) {
const value = border[name];
// value is an empty object when undefined
if (typeof value === "string") {
const borderItem = list.createItem({
type: "Declaration",
property: "--pagedjs-border-" + b,
property: "--pagedjs-border-" + name,
value: {
type: "Raw",
value: value
}
});
list.append(bVar, item);
list.append(borderItem, item);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment