Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = function(proto, opts) {
if (!opts) opts = {}
if (!proto) throw new Error('Pass in a .proto string or a protobuf-schema parsed object')

var sch = (typeof proto === 'object' && !Buffer.isBuffer(proto)) ? proto : schema.parse(proto)
var sch = (typeof proto === 'object' && !Buffer.isBuffer(proto)) ? proto : schema.parse(proto, opts)

// to not make toString,toJSON enumarable we make a fire-and-forget prototype
var Messages = function() {
Expand Down
2 changes: 1 addition & 1 deletion require.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ var protobuf = require('./')
delete require.cache[require.resolve(__filename)]

module.exports = function(filename, opts) {
return protobuf(resolve.sync(path.resolve(path.dirname(module.parent.filename), filename)), opts)
return protobuf(resolve.sync(path.resolve(path.dirname(module.parent.filename), filename), opts))
}