pubnub / js-chat

PubNub JavaScript Chat SDK
https://github.com/pubnub/js-chat
8 stars 8 forks source link

fix: replace <= with : into regex #162

Closed gitmazzio closed 5 months ago

gitmazzio commented 5 months ago

Hi all,

I noticed that using js-chat caused a blank page on my nextjs project. I investigate and the regex throw Invalid regular expression: invalid group specifier name error. Here's the fix!

piotr-suwala commented 5 months ago

Hello @gitmazzio!

We're investigating the problem. We'll take a look at this PR in the upcoming days.

piotr-suwala commented 5 months ago

Hello @gitmazzio. I checked your changes and unfortunately certain unit tests didn't pass. I allowed myself push a new commit with another regex (without look behind and with passing all tests) to your fork and branch. Can you take a look and check if my recent change here works in your application on that old Safari?

Thanks Piotr

gitmazzio commented 5 months ago

Hello @gitmazzio. I checked your changes and unfortunately certain unit tests didn't pass. I allowed myself push a new commit with another regex (without look behind and with passing all tests) to your fork and branch. Can you take a look and check if my recent change here works in your application on that old Safari?

Thanks Piotr

hi @piotr-suwala,

it works also for old safari version!

piotr-suwala commented 5 months ago

@gitmazzio merged and deployed. Available under 0.7.0 👍 . Thank you for your contribution.