Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabletop undefined when run with browserify #9

Open
tmfrnz opened this issue Mar 2, 2016 · 0 comments
Open

Tabletop undefined when run with browserify #9

tmfrnz opened this issue Mar 2, 2016 · 0 comments

Comments

@tmfrnz
Copy link

tmfrnz commented Mar 2, 2016

I am getting a "Tabletop undefined" error on my injected script with the API callback "Tabletop.singleton.loadsheets"

Here is my wrapper module/function

var Tabletop = require('tabletop')
var tabletop
module.exports = function (args, callback) {
return function () {
tabletop = Tabletop.init({
key: args.key,
wanted:[args.sheet],
callback:args.callback,
prettyColumnNames :false,
parseNumbers: false,
proxy: (args.isProxy && typeof args.bucket !== 'undefined')
? 'http://'+args.bucket+'.s3.amazonaws.com'
: undefined
})
}
}
}

Adding the following line resolves the issue

window.Tabletop = window.Tabletop || Tabletop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant