Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

tagging function with array of string not working #1990

Open
@Planet910

Description

@Planet910

I want to limit the tag creation for string with length < 2 but I always get this error:

Uncaught TypeError: Cannot create property 'isTag' on string

this is the tagging function:

vm.tagging` = function (text) {
           if(!text || text.length < 2)
               return null;
           return text;
       };

and here is a plunker: http://plnkr.co/edit/SS3V4A13nAbPDRAYrdaI?p=preview

You can see the error in the console and the new tag is not created.
I suppose the error is because he expect an object to be returned from that function and I return a string. I dunno how to limit the creation of tag with an array of string and I really need this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions