Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Luis Martins

    (@lmartins)

    Ok, I just discovered that it wasn’t the Better Internal Link Search that broke the functionality, it was actually the ACF field plugin. Sorry about that.

    Actually, this does seem like a bug with BILS.

    Line 23 of internal-link-manager.js checks if ed is false, but a simple check for a “falsey” value (if (!ed)) handles the case where ed is null as well. And it should return an empty string and not false, as later on the indexOf method is called on the return value of getSelection, which throws an error if it equals false.

    So setting line 23-25 as

    if ( ! ed) {
        return '';
    }

    works correctly.

    Thread Starter Luis Martins

    (@lmartins)

    Just tested Corey’s suggestion and it does solve the problem.
    Went ahed and submitted a PR with the fix:
    https://github.com/bradyvercher/better-internal-link-search/pull/10

    Thread Starter Luis Martins

    (@lmartins)

    Brady already merged the fix into the main repo, a fix will probably come with the next release. Closing this now. Thank you both Corey and Brady. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Stopped working inside ACF’ is closed to new replies.