File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
import Worker from '../worker.js' ;
2
- import { objType , createElement } from './utils.js' ;
2
+ import { objType , createElement } from '.. /utils.js' ;
3
3
4
4
// Add page-break functionality.
5
5
@@ -33,9 +33,10 @@ Worker.prototype.toContainer = function toContainer() {
33
33
34
34
// Get arrays of all explicitly requested elements.
35
35
var select = { } ;
36
+ var self = this ;
36
37
[ 'before' , 'after' , 'avoid' ] . forEach ( function ( key ) {
37
38
var all = mode . avoidAll && key === 'avoid' ;
38
- select [ key ] = all ? [ ] : [ ] . concat ( this . opt . pageBreak [ key ] ) ;
39
+ select [ key ] = all ? [ ] : ( undefined === self . opt . pageBreak [ key ] ? [ ] : [ ] . concat ( self . opt . pageBreak [ key ] ) ) ;
39
40
if ( select [ key ] . length > 0 ) {
40
41
select [ key ] = Array . prototype . slice . call (
41
42
root . querySelectorAll ( select [ key ] . join ( ', ' ) ) ) ;
You can’t perform that action at this time.
0 commit comments