发布

  • fix(scripts): guard persist_design_system against None project_name (#388)

    frostbyte_neo 发布于 2026-06-25 08:43:33 +00:00 | 95 次提交 在此版本后已推送到 main

    persist_design_system crashed with AttributeError: 'NoneType' object has
    no attribute 'lower' when the design_system dict carries an explicit
    project_name of None (the default of generate(query, project_name=None)).
    dict.get("project_name", "default") only substitutes the default for a
    MISSING key, not a present-but-None value, so project_name.lower() blew
    up.

    Coalesce falsy values (None/""/missing) to "default" before slugifying.
    Applied to both the source of truth and the bundled cli/assets copy.

    The "search blindness" half of #159 (core.py tokenize length filter) is
    already resolved on main (len(w) >= 2), so this targets the remaining
    crash only.

    Closes #159

    Co-authored-by: YangKuoshih 155388493+YangKuoshih@users.noreply.github.com

    下载附件