FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Return empty string instead of "undefined" on non-existent variables · Issue #35 · blueimp/JavaScript-Templates · GitHub

This repository was archived by the owner on Sep 25, 2021. It is now read-only.
This repository was archived by the owner on Sep 25, 2021. It is now read-only.

Return empty string instead of "undefined" on non-existent variables #35

Description

On line 69 (first line of tmpl.encode) I added this super simple patch to return an empty string instead of the string "undefined" when a specific value is not passed to the function.

if (!s) return '';

Figured I'd at least put it out here in case others are looking for the same thing, and maybe it's something you want to include (or know a more correct way for).

Thanks for a super simple-to-use, slim and awesome lib.

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


    Back | FazBrowse Home | New Git URL