Skip to content

fix: avoid mutating _layers - #1455

Merged
pi0 merged 1 commit into
mainfrom
fix/layers
Aug 16, 2022
Merged

fix: avoid mutating _layers#1455
pi0 merged 1 commit into
mainfrom
fix/layers

Conversation

@pi0

@pi0pi0 commented Aug 16, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

We introduced a fix in #1418 to reverse scan layers and regression of #1404. By calling reverse() we were mutating original _layers too causing whole layer scanning logic after content being broken.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify

netlifyBot commented Aug 16, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt-content ready!

NameLink
🔨 Latest commit890472a
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt-content/deploys/62fb870e55f0a10009e1d32d
😎 Deploy Previewhttps://deploy-preview-1455--nuxt-content.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@pi0
pi0 requested a review from farnabazAugust 16, 2022 12:02
@pi0

pi0 commented Aug 16, 2022

Copy link
Copy Markdown
MemberAuthor

An alternative would be not reversing layers and instead push component dirs (we can do in another PR as currently scanning is broken).

/cc @atinux Do you remember why had to originally unshift component dirs instead of pushing?

@pi0
pi0 merged commit f592e7b into mainAug 16, 2022
@pi0
pi0 deleted the fix/layers branch August 16, 2022 12:28
@farnabazfarnabaz mentioned this pull request Sep 2, 2022
farnabaz pushed a commit that referenced this pull request Sep 7, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pi0@farnabaz