zingtouch icon indicating copy to clipboard operation
zingtouch copied to clipboard

TypeError: Cannot read property 'Region' of undefined

Open whoacowboy opened this issue 5 years ago • 0 comments

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

whoacowboy avatar May 31 '19 13:05 whoacowboy