Declare OCA.Search directly, not via a monkey patch
Apps could use OCA.Search very early on a page load without a problem
prior to Nextcloud 20 (current master). Since the unified search work
moved some code around, it now was added later, resulting in `TypeError:
OCA.Search is not a constructor` errors if the apps did not wrap their
calls in a `DOMLoaded` event handler.
To ensure existing code continues to work without modification, this
patch moves the declaration of the `OCA.Search` API to where we defined
`OCA`, instead of monkey-patching it later on.
Signed-off-by:
Christoph Wurst <christoph@winzerhof-wurst.at>
Showing
- core/js/dist/login.js 0 additions, 0 deletionscore/js/dist/login.js
- core/js/dist/login.js.map 0 additions, 0 deletionscore/js/dist/login.js.map
- core/js/dist/main.js 0 additions, 0 deletionscore/js/dist/main.js
- core/js/dist/main.js.map 0 additions, 0 deletionscore/js/dist/main.js.map
- core/js/dist/unified-search.js 0 additions, 0 deletionscore/js/dist/unified-search.js
- core/js/dist/unified-search.js.map 0 additions, 0 deletionscore/js/dist/unified-search.js.map
- core/src/OCA/index.js 8 additions, 1 deletioncore/src/OCA/index.js
- core/src/OCA/search.js 34 additions, 0 deletionscore/src/OCA/search.js
- core/src/unified-search.js 0 additions, 12 deletionscore/src/unified-search.js
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
core/src/OCA/search.js
0 → 100644
Please register or sign in to comment