Open benwest opened 3 years ago
Hello @benwest,
Thanks for your interest in Kirby Webpack. Can you be more specific when you say "method of detecting the panel didn't work"? What didn't work exactly? The panel seems to work correctly on my side when I connect to localhost:8080/panel
(with Kirby 3.5.3)
The panel would reload whenever the .lock
file was written, because inPanel() === false
.
I just did a fresh install of Kirby 3.5.1, went to /panel
, pasted inPanel
's definition into the console, and called it - false
.
The panel would reload whenever the
.lock
file was written, becauseinPanel() === false
.
I got the same issue and your PR fixes it.
The only issue I see with your fix is if someone have a panel
key in their global namespace, in which case the inPanel()
function will cause a false positive.
True, neither method is ideal, but these are edge cases and I don’t think this way is any worse.
Speculatively what would be the clean/correct way to do this? A Kirby plugin?
The method of detecting the panel didn't work for me, maybe Kirby 3.5 broke it? This works.