Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pathname parsing for tracked files #5008

Merged
merged 1 commit into from Aug 27, 2021

Commits on Jul 18, 2021

  1. Fix pathname parsing for tracked files

    The trackedModified call in the tracking logic has a bug that
    incorrectly removes `null` from pathnames
    
    Currently:
    ```
    let pathname = parsed.href.replace(parsed.hash, '').replace(parsed.search, '')
    ```
    Where if `parsed.hash` or `parsed.search` are missing (which is
    mostly the case for FS files), the value is null
    eg `{ hash: null, search: null}`
      - In which case, we essentially trim `null`
    converting `/mypath/nulldir/file.js` -> `/mypath/dir/filejs` and
    breaking builds (see tailwindlabs#4920 ).
    
    Fix checks if `hash` or `search` are set before replacing them
    
    Fixes tailwindlabs#4920
    peteretelej committed Jul 18, 2021
    Copy the full SHA
    2f0514f View commit details
    Browse the repository at this point in the history