Skip to content

instance is undefined #2

Open
Open

Description

@fiddur

When using $.addObject I get "instance is undefined" from firebug at line 14.

Changing line 13 (the one above) from:
if (typeof arg == 'string'){
to
if (typeof arg == 'string' && typeof instance !== 'undefined') {

...makes it work well for me.

Actually, I don't see how it could work without that check?!

Activity

  1. fiddur commented on Sep 29, 2011

    @fiddur
    Author

    This is with jQuery 1.5 and the problem shows itself with a simple test page:

      function test(selection, foo) { $(selection).html(foo); }
      $.addObject('test', test);
      $('body').test('bar');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions