elegance-js 1.11.26 → 1.11.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -325,8 +325,12 @@ var loadPage = (deprecatedKeys = [], newBreakpoints) => {
325
325
  }
326
326
  const loadHooks = pageData.lh;
327
327
  for (const loadHook of loadHooks || []) {
328
- const bind = loadHook.bind;
329
- if (bind !== void 0 && newBreakpoints && !newBreakpoints.includes(`${bind}`)) {
328
+ const bind = loadHook.bind ?? "";
329
+ if (
330
+ // generateClientPageData makes undefined binds into empty strings
331
+ // so that the page_data.js is *smaller*
332
+ bind !== "" && newBreakpoints && !newBreakpoints.includes(`${bind}`)
333
+ ) {
330
334
  continue;
331
335
  }
332
336
  const fn = loadHook.fn;
@@ -20,7 +20,7 @@ export type LoadHook = {
20
20
  bind: number | string;
21
21
  };
22
22
  export type ClientLoadHook = {
23
- bind: number;
23
+ bind: string;
24
24
  fn: (state: State) => (void | (() => void) | Promise<(void | (() => void))>);
25
25
  };
26
26
  export declare const resetLoadHooks: () => never[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elegance-js",
3
- "version": "1.11.26",
3
+ "version": "1.11.27",
4
4
  "description": "Web-Framework",
5
5
  "type": "module",
6
6
  "bin": {