robbestad / react-iframe

Simple solution for using iframes in React
ISC License
436 stars 79 forks source link

Fix(#139): Camelcase 'allowFullScreen' doesn't work when 'allow' attribute is set #140

Open masserra opened 7 months ago

masserra commented 7 months ago

As described in the #139, I went ahead and added 2 changes:

1) After checking if "allow" in props I also checked to see if fullscreen was not included in the props.allow. If it's not then, yes, proceed to concatenating it to the beginning or the props.allow string. If it's already existent, it doesn't make sense to complicate things by removing it and re-adding it to the beginning of the string, as this either will leave orphan ; hanging or with have to make more unnecessary work to clean it up.

2) Removed the .trim() from the end of the line as it was redundant. It is already being done when using it inside the string literal.