lukemadera / meteor-autoform-googleplace

Google Places Autocomplete input (without map). Returns an object with formatted address components
21 stars 19 forks source link

Cannot read property 'type' of null #6

Closed znat closed 9 years ago

znat commented 9 years ago

Hi there, I just had this error after following the install steps:

TypeError: Cannot read property 'type' of null
at Template.afGooglePlace.rendered (lukemadera_autoform-googleplace.js:308)
at runTemplateHooks (template-extension.js:375)
at templateExtensionMasterHook (template-extension.js:324)
at template.js:116
at Function.Template._withTemplateInstanceFunc (template.js:437)
at fireCallbacks (template.js:112)
at null.<anonymous> (template.js:205)
at view.js:104
at Object.Blaze._withCurrentView (view.js:523)
at view.js:103

Any idea what the problem is? Thanks!

lukemadera commented 9 years ago

Hmm, things are working fine for me and on the demo. It seems to be your calling code - in general if you follow the examples you should be able to get it working. http://lukemadera-packages.meteor.com/af-googleplace-basic

code: https://github.com/lukemadera/meteor-packages/tree/master/autoform-googleplace/basic

If you are still having issues, and you can point to a an app or code where you are seeing this error I can try to help.

nishanth-saka commented 8 years ago

You must've missed out on the helper for 'optsGoogleplace' value - that was my issue.

Template.autoformGoogleplaceBasic.helpers({ optsGoogleplace: function() { return { // type: 'googleUI', // stopTimeoutOnKeyup: false, // googleOptions: { // componentRestrictions: { country:'us' } // } } } });