Skip to content

Commit

Permalink
Dev: Don't define JS LS without checking for existing object
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed May 14, 2016
1 parent 6bc9181 commit 0f4e69a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions application/extensions/LimeScript/assets/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Initial definition of Limesurvey javascript object.
var LS = {};
// If LS was already defined (e.g. in a plugin), use that object.
var LS = LS || {};

LS.createUrl = function (route, params)
{
Expand Down Expand Up @@ -47,4 +48,4 @@ LS.createUrl = function (route, params)
}

return result;
};
};

0 comments on commit 0f4e69a

Please sign in to comment.