Use Buffer.from instead of deprecated new Buffer

Use Buffer.from instead of deprecated new Buffer.
This commit is contained in:
Boik 2017-06-12 16:57:42 +08:00 committed by GitHub
parent a6ea316a5d
commit 2e9ace6f59

View file

@ -83,7 +83,7 @@ const startBackgroundPages = function (manifest) {
const scripts = manifest.background.scripts.map((name) => { const scripts = manifest.background.scripts.map((name) => {
return `<script src="${name}"></script>` return `<script src="${name}"></script>`
}).join('') }).join('')
html = new Buffer(`<html><body>${scripts}</body></html>`) html = Buffer.from(`<html><body>${scripts}</body></html>`)
} }
const contents = webContents.create({ const contents = webContents.create({