mobxjs / mobx-vue

🐉 Vue bindings for MobX
MIT License
475 stars 22 forks source link

Fix wkhtml "TypeError: Attempting to change value of a readonly property." #29

Closed azzra closed 5 years ago

azzra commented 5 years ago

When using with wkhtmltopdf (0.12.4) wkhtmltopdf --debug-javascript http://host/page file.pdf, it output the error TypeError: Attempting to change value of a readonly property.

My investigations leads me to find that Webkit doesn't consider ExtendedComponent.name as configurable, so I made the property definition conditional.

It works fine on Firefox & Chrome.

Context Observer is set in traditionnal way.

codecov-io commented 5 years ago

Codecov Report

Merging #29 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #29   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines          40     42    +2     
  Branches        7      9    +2     
=====================================
+ Hits           40     42    +2
Impacted Files Coverage Δ
src/observer.ts 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f620a24...ddc2791. Read the comment docs.

kuitos commented 5 years ago

Thanks!