PeculiarVentures / webcrypto-liner

webcrypto-liner is a polyfill that let's down-level User Agents (like IE/Edge) use libraries that depend on WebCrypto. (Keywords: Javascript, WebCrypto, Shim, Polyfill)
MIT License
149 stars 26 forks source link

Init failed on Safari 602.1 #37

Closed WorldThirteen closed 7 years ago

WorldThirteen commented 7 years ago

Liner is failed to init on IOS Safari 602.1 Next used regular expression returns null

/([\d\.]+) safari/i.exec(userAgent)[1];

and getting [1] throws an exception: TypeError: null is not an object (evaluating '/([\\d\\.]+) safari/i.exec(userAgent)[1]')

User agent:

Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.3 (KHTML, like Gecko) Version/10.0 Mobile/14F5080a Safari/602.1
microshine commented 7 years ago

@WorldThirteen Could you check last update?

WorldThirteen commented 7 years ago

@microshine, sure, I will notify at the nearest time.

WorldThirteen commented 7 years ago

Fixed. last notice before closing: should next files also be changed? https://github.com/PeculiarVentures/webcrypto-liner/blob/master/scripts/linerBrowserInit.js#L39 https://github.com/PeculiarVentures/webcrypto-liner/blob/master/scripts/linerWorkerInit.js#L39

microshine commented 7 years ago

thank you. I forgot about those files