widget: css parsing error on iOS (always use a string value for css property) (#282)

This commit is contained in:
jean-emmanuel 2018-04-30 07:20:54 +02:00
parent 869f824ab4
commit 8518925dca
2 changed files with 2 additions and 1 deletions

View file

@ -4,6 +4,7 @@
- bug fixes
- launcher: parsing errors are not fatal anymore
- css parsing error on iOS
## 0.29.1

View file

@ -585,7 +585,7 @@ class Widget extends EventEmitter {
} catch(err) {
// fallback for browser that don't allow assigning "style" property
this.getProp('css')
css
.replace(/\{[^\}]*\}/g, '')
.replace(/^[^@#\.]*\:.*/gm, (m) => {
unScopedCss += m[m.length - 1] === ';' ? m : m + ';'