Skip to content

Sticker picker modal fails to render due to removed Lucide brand icons (v1.0) #548

Description

@beingskyler

Title: Sticker picker modal fails to render due to removed Lucide brand icons (v1.0)


Describe the bug

Clicking any sticker/icon picker in Make.md produces a blank modal with a gray overlay. The underlying interface becomes unresponsive. The picker never renders.

To Reproduce

  1. Install Make.md on Obsidian 1.13.1
  2. Right-click any file or folder in the sidebar
  3. Click the icon/sticker to open the picker
  4. Observe: gray overlay appears, modal is empty, interface is unresponsive

Expected behavior

The sticker picker modal renders with a searchable list of icons to select from.

Console errors

TypeError: Cannot read properties of null (reading 'outerHTML')
    at eval (plugin:make-md:971:15770)
    at Array.map (<anonymous>)
    at DG.allStickers (plugin:make-md:971:15699)
    at lw.allStickers (plugin:make-md:177:35671)

Root cause

allStickers() maps over a hardcoded Lucide icon name array (uG) and calls getIcon(i).outerHTML on each entry without a null check:

let t = uG.map(i => ({
    html: (0, ks.getIcon)(i).outerHTML  // crashes when getIcon returns null
}))

Lucide removed all brand/logo icons in v1.0 for trademark reasons. Obsidian's bundled Lucide version reflects this removal, so getIcon() returns null for 16 icons still present in uG. The first null crashes the .map(), which prevents the modal from rendering at all.

Failing icons (16 total)

chrome, codepen, codesandbox, dribbble, facebook, figma, framer, gitlab, instagram, linkedin, pocket, slack, trello, twitch, twitter, youtube

Proposed fix

Add optional chaining with a fallback:

html: (0, ks.getIcon)(i)?.outerHTML ?? ""

Environment

  • Obsidian: 1.13.1
  • Make.md: 1.3.4
  • OS: macOS
  • Tested in sandbox vault with Make.md as the only plugin, no custom CSS or themes

Workarounds

Temporary runtime patch (resets on Obsidian reload):
Paste the following into the Obsidian dev tools console before clicking the sticker picker:

const plugin = app.plugins.plugins['make-md'];
const originalAllStickers = plugin.ui.allStickers.bind(plugin.ui);

plugin.ui.allStickers = function() {
    const originalMap = Array.prototype.map;
    Array.prototype.map = function(fn) {
        return originalMap.call(this, item => {
            try { return fn(item); } catch(e) { return null; }
        }).filter(Boolean);
    };
    try {
        return originalAllStickers();
    } finally {
        Array.prototype.map = originalMap;
    }
};

Manual YAML edit:
The sticker property can be set directly in the file's YAML frontmatter via an external text editor:

---
sticker: "lucide//info"
---

However the sticker property is intentionally hidden from Obsidian's native property editor via injected CSS (display: none). To make it visible for manual editing within Obsidian, you must temporarily override that rule in dev tools:

.metadata-property[data-property-key="sticker"] { display: flex !important; }

This confirms the sticker value is being read and applied correctly — the bug is isolated to the picker modal rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions