Skip to content

Commit cd4200a

Browse files
committed
Merge pull request phaserjs#810 from jflowers45/dev
Update Silk UA test to avoid Safari conflict
2 parents a60246d + 821da77 commit cd4200a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/system/Device.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,10 +588,6 @@ Phaser.Device.prototype = {
588588
{
589589
this.safari = true;
590590
}
591-
else if (/Silk/.test(ua))
592-
{
593-
this.silk = true;
594-
}
595591
else if (/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(ua))
596592
{
597593
this.ie = true;
@@ -600,6 +596,12 @@ Phaser.Device.prototype = {
600596
this.ieVersion = parseInt(RegExp.$3, 10);
601597
}
602598

599+
//Silk gets its own if clause because its ua also contains 'Safari'
600+
if (/Silk/.test(ua))
601+
{
602+
this.silk = true;
603+
}
604+
603605
// WebApp mode in iOS
604606
if (navigator['standalone'])
605607
{

0 commit comments

Comments
 (0)