From c1b4679c739d77ea9a4524da9eeee078c0efa539 Mon Sep 17 00:00:00 2001 From: Baraka Date: Fri, 16 Dec 2016 01:31:12 -0600 Subject: [PATCH] Object.assign() Fix Object.assign() returns undefined making a lot of the functionality broken with Radiant Player. Adding a Polyfill will resolve this issue in the webView Images of the bug: http://i.imgur.com/0qvzALG.png http://i.imgur.com/4BtRGA0.png --- radiant-player-mac/AppDelegate.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/radiant-player-mac/AppDelegate.m b/radiant-player-mac/AppDelegate.m index 46745d82..5b8cec76 100644 --- a/radiant-player-mac/AppDelegate.m +++ b/radiant-player-mac/AppDelegate.m @@ -975,6 +975,8 @@ - (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame { // Only apply the main script file when the player is ready. if ([[webView mainFrameDocument] querySelector:@"#playerSongInfo"]) { + /* Recent update Object.assign() returns undefined making a lot of the functionality broken adding a Polyfill should fix this */ + [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"if(Object.assign == undefined){Object.defineProperty(Object,\"assign\",{enumerable:!1,configurable:!0,writable:!0,value:function(a){\"use strict\";if(void 0===a||null===a)throw new TypeError(\"Cannot convert first argument to object\");for(var b=Object(a),c=1;c