zendesk/linked_ticket_app — pull request #18 by isaacsu (2014-03-20 05:06:22+00:00)
Title: [BUG] Can't create linked ticket in Safari

:koala: :+1: :bug:

When using this app in Safari, submitting the form to create a linked ticket halts at the spinner with the following error showing up in the console log:

TypeError: Attempted to assign to readonly property

When preparing the request, ZAF expects the `data:` property to be an object in order to perform operations such as [options.data.authenticity_token = authenticityToken()](https://github.com/zendesk/zendesk_app_framework/blob/master/lib/request.js#L296).

As a result, when `options.data` is a string, `options.data.authenticity_token = authenticityToken()` with `"use strict"` fails silently in Chrome and Firefox, but raises the above error in Safari.

@pi3r Was there a reason why you changed from an earlier `data: ticket` to `data: JSON.stringify(ticket)` in https://github.com/zendesk/linked_ticket_app/commit/f891f5038ecd014dc736e14731d23f22daff4fb8#diff-0364f57fbff2fabbe941ed20c328ef1aR141?

Support Ticket: https://support.zendesk.com/agent/#/tickets/671704
Jira Ticket: https://zendesk.atlassian.net/browse/APPS-1508

/cc @zendesk/quokka @ryanseddon