Skip to content

Commit

Permalink
fix: undefined variable Buffer in reed
Browse files Browse the repository at this point in the history
  • Loading branch information
soldair committed Nov 5, 2019
1 parent 7a20d69 commit 6058f49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
20 changes: 10 additions & 10 deletions examples/clientsideserver.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var express = require('express')
var app = express();//.createServer()
var app = express()// .createServer()
var http = require('http')
var fs = require('fs')
var QRCode = require('../lib')
Expand All @@ -9,19 +9,19 @@ var Image = Canvas.Image

var path = require('path')

//app.use(express.methodOverride())
//app.use(express.bodyParser())
// app.use(express.methodOverride())
// app.use(express.bodyParser())
// app.use(app.router)
//app.use(express.static(path.resolve(__dirname, '..')))
// app.use(express.static(path.resolve(__dirname, '..')))

app.get('/qrcode.js',(req,res)=>{
res.set('content-type','text/javascript');
fs.createReadStream(path.join(__dirname,'..','build','qrcode.js')).pipe(res)
app.get('/qrcode.js', (req, res) => {
res.set('content-type', 'text/javascript')
fs.createReadStream(path.join(__dirname, '..', 'build', 'qrcode.js')).pipe(res)
})

app.get('/qrcode.tosjis.js',(req,res)=>{
res.set('content-type','text/javascript');
fs.createReadStream(path.join(__dirname,'..','build','qrcode.tosjis.js')).pipe(res)
app.get('/qrcode.tosjis.js', (req, res) => {
res.set('content-type', 'text/javascript')
fs.createReadStream(path.join(__dirname, '..', 'build', 'qrcode.tosjis.js')).pipe(res)
})

app.get('/', function (req, res) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/reed-solomon-encoder.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var BufferUtil = require('../utils/buffer')
var Polynomial = require('./polynomial')
var Buffer = require('buffer')

function ReedSolomonEncoder (degree) {
this.genPoly = undefined
Expand Down

0 comments on commit 6058f49

Please sign in to comment.