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

TypeError: Cannot read property 'Region' of undefined #65

Open
whoacowboy opened this issue May 31, 2019 · 0 comments
Open

TypeError: Cannot read property 'Region' of undefined #65

whoacowboy opened this issue May 31, 2019 · 0 comments

Comments

@whoacowboy
Copy link
Collaborator

I recently upgraded ZingTouch and now I receive an error

The working index.js looks like this

// working index.js
require('./dist/zingtouch.min.js');
module.exports = ZingTouch;

The current code with index.js gives me an error.

// not working index.js
const ZingTouch = require('./dist/zingtouch.min.js').default;
module.exports = ZingTouch;

I haven't changed my source other than the upgrade.

I have a vue.js webpack app.

import ZingTouch from 'zingtouch'
export default () {
    ...
    mounted: function () {
      console.log(ZingTouch)
      this.appZingTouch = new ZingTouch.Region(document.getElementById('app'), false, false)
    }
    ...
}

This logs undefined and throws the error

TypeError: Cannot read property 'Region' of undefined

Any help would be appreciated.

Thanks

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