Fix Node.js 4.x compatibility (#9503)

no issue
- fixes compatibility issue introduced in 7548ace32d
This commit is contained in:
Kevin Ansfield 2018-03-15 09:50:25 +00:00 committed by GitHub
parent 7548ace32d
commit df1188d25a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -3,7 +3,9 @@
module.exports = {
name: 'html',
type: 'dom',
render({payload, env: {dom}}) {
render(opts) {
let payload = opts.payload;
let dom = opts.env.dom;
let caption = '';
if (payload.caption) {

View File

@ -3,7 +3,9 @@
module.exports = {
name: 'image',
type: 'dom',
render({payload, env: {dom}}) {
render(opts) {
let payload = opts.payload;
let dom = opts.env.dom;
let figure = dom.createElement('figure');
let img = dom.createElement('img');