Skip to content

Commit d476407

Browse files
committed
Minor refactor when handling undefined keys
1 parent 97e269e commit d476407

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugin/pagebreaks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Worker.prototype.toContainer = function toContainer() {
3636
var self = this;
3737
['before', 'after', 'avoid'].forEach(function(key) {
3838
var all = mode.avoidAll && key === 'avoid';
39-
select[key] = all ? [] : (undefined === self.opt.pageBreak[key] ? [] : [].concat(self.opt.pageBreak[key]));
39+
select[key] = all ? [] : [].concat(self.opt.pageBreak[key] || []);
4040
if (select[key].length > 0) {
4141
select[key] = Array.prototype.slice.call(
4242
root.querySelectorAll(select[key].join(', ')));

0 commit comments

Comments
 (0)