Skip to content

Commit

Permalink
Accept string or object.
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Aug 5, 2021
1 parent b01c72e commit 594b6a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/tsugiscripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ window.addEventListener('message', function (e) {
// console.log(window.location.href + " got message");
// console.log(e.data);
try {
var message = JSON.parse(e.data);
var message = e.data;
if ( typeof message == 'string' ) message = JSON.parse(e.data);

switch (message.subject) {
case 'lti.frameResize':
var height = message.height;
Expand Down

0 comments on commit 594b6a6

Please sign in to comment.