mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
Make tomahawk.js more portable
This commit is contained in:
parent
fc45207ba7
commit
c0b54f0410
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
// if run in phantomjs add fake Tomahawk environment
|
||||
if (window.Tomahawk === undefined) {
|
||||
if ((typeof Tomahawk === "undefined") || (Tomahawk === null)) {
|
||||
var Tomahawk = {
|
||||
fakeEnv: function () {
|
||||
return true;
|
||||
@ -302,8 +302,8 @@ Tomahawk.asyncRequest = function (url, callback, extraHeaders, options) {
|
||||
xmlHttpRequest.send(null);
|
||||
};
|
||||
|
||||
Tomahawk.sha256 = CryptoJS.SHA256;
|
||||
Tomahawk.sha256 = Tomahawk.sha256 || CryptoJS.SHA256;
|
||||
|
||||
// some aliases
|
||||
Tomahawk.setTimeout = window.setTimeout;
|
||||
Tomahawk.setInterval = window.setInterval;
|
||||
Tomahawk.setTimeout = Tomahawk.setTimeout || window.setTimeout;
|
||||
Tomahawk.setInterval = Tomahawk.setInterval || window.setInterval;
|
||||
|
@ -940,7 +940,7 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
|
||||
{
|
||||
const QString plid = msg.value( "playlistid" ).toString();
|
||||
// We should already be syncing this playlist if we get updates for it
|
||||
Q_ASSERT( m_updaters.contains( plid ) );
|
||||
// Q_ASSERT( m_updaters.contains( plid ) );
|
||||
|
||||
if ( !m_updaters.contains( plid ) )
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user