cibernox / ember-power-calendar

Powerful and customizable calendar component for Ember
http://www.ember-power-calendar.com
Other
211 stars 118 forks source link

Setting locale on the calendar service throws a deprecation warning. #226

Closed alexabreu closed 8 months ago

alexabreu commented 5 years ago
deprecate.js:120 DEPRECATION: The <tracker-web@service:power-calendar::ember191>#locale computed property was just overriden. This removes the computed property and replaces it with a plain value, and has been deprecated. If you want this behavior, consider defining a setter which does it manually. [deprecation id: computed-property.override] See https://emberjs.com/deprecations/v3.x#toc_computed-property-override for more details.
        at logDeprecationStackTrace (https://alex.arcgis.com:4200/assets/vendor.js:57495:23)
        at HANDLERS.<computed> (https://alex.arcgis.com:4200/assets/vendor.js:57589:11)
        at raiseOnDeprecation (https://alex.arcgis.com:4200/assets/vendor.js:57522:11)
        at HANDLERS.<computed> (https://alex.arcgis.com:4200/assets/vendor.js:57589:11)
        at handleDeprecationWorkflow (https://alex.arcgis.com:4200/assets/vendor.js:84452:9)
        at HANDLERS.<computed> (https://alex.arcgis.com:4200/assets/vendor.js:57589:11)
        at deprecationCollector (https://alex.arcgis.com:4200/assets/vendor.js:84477:5)
        at HANDLERS.<computed> (https://alex.arcgis.com:4200/assets/vendor.js:57589:11)
        at invoke (https://alex.arcgis.com:4200/assets/vendor.js:57601:11)

https://deprecations.emberjs.com/v3.x/#toc_computed-property-override

Based on the deprecation link, it seems the warning could be fixed by adding a set method here.

cibernox commented 5 years ago

Indeed, that seems an easy fix. I'm not on a computer but if you can make a PR i can merge it and release a new patch version tomorrow.