Skip to content

Commit

Permalink
Use new AppForClient in derby@4 if present (#29)
Browse files Browse the repository at this point in the history
derby@4 moves client-only logic into a new AppForClient subclass, so the derby-webpack override of _views() needs to happen on the subclass. This falls back to using App for backwards compatibility.
  • Loading branch information
ericyhwang authored May 1, 2024
1 parent 2b57252 commit 34dff14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/browser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if (process.title === 'browser') {
const App = require('derby/App').App;
const AppModule = require('derby/App');
// AppForClient introduced in derby@4
const App = AppModule.AppForClient || AppModule.App;

App.prototype._views = function () {
const appName = this.name;
Expand Down

0 comments on commit 34dff14

Please sign in to comment.