Skip to content

Uncaught Error: Assertion Failed: The initializer 'token-cookie' has already been registered #13

@hoylemd

Description

@hoylemd

I'm trying to use this plugin in my app, but I'm getting the above error when I try to inject the cookie into my routes.

This is my initializer, at app/initializers/token-cookie.js

import Ember from 'ember';

export default Ember.Application.initializer({
  name: "token-cookie",
  after: ['cookie'],
  initialize: function(container, application) {
    application.inject('route', 'cookie', 'cookie:main');
  }
});

it's copied almost directly from the npm page, but it's blowing up immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions