Skip to content

Instantly share code, notes, and snippets.

// This comma at the end of line-12 does not appear in the docs (https://developers.facebook.com/docs/accountkit/webjs).
// Omitting the comma results in the following console error: 'Uncaught SyntaxError: Unexpected identifier'.
// Adding the comma results in AccountKit'ing success! (assuming all other constraints are met)
<script>
// initialize Account Kit with CSRF protection
AccountKit_OnInteractive = function(){
AccountKit.init(
{
appId:"{{FACEBOOK_APP_ID}}",
# http://homebasehq.staging.wpengine.com/hb-styleguide/modules.html#modals
.modal.fade#iconModal{tabindex: "-1", "role": "dialog", "aria-labelledby": "myModalLabel"}
.modal-dialog{role: "document"}
.modal-content
.modal-header
%button.close{type: "button", "data-dismiss": "modal", "aria-label": "Close"}
%i.fa.fa-times
.modal__icon
%span.icon-schedule
require 'react/jsx/template'
class React::JSX::Template
SYNTAX_ERROR_MESSAGE = /SyntaxError: unknown: Unexpected token \((\d+):(\d+)\)/
def evaluate_with_better_errors(scope, locals, &block)
evaluate_without_better_errors(scope, locals, &block)
rescue ExecJS::RuntimeError => error