mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 21:45:25 +08:00
## What does this change? Replaces the deprecated Ember native-array-extension call used when a backup operation starts: ```javascript logs.clear(); ``` with: ```javascript logs.splice(0); ``` This clears the backup logs while preserving the existing `@autoTrackedArray` instance. ## Why? Starting a backup sends a `[STARTED]` message through the `/admin/backups/logs` MessageBus channel. Its callback currently calls `.clear()`, triggering: ```text discourse.native-array-extensions.clear ``` When JavaScript deprecations are configured to raise errors, this also causes the MessageBus callback to fail. ## Testing Added a unit test confirming that a `[STARTED]` message: - clears existing backup-log entries; - preserves the tracked-array instance; - marks the backup operation as running; - hides the read-only alert. Local checks completed: - Prettier - ESLint - Git whitespace checks The focused QUnit test was not run locally because a complete Ruby/Discourse test environment was not installed. --------- Co-authored-by: Bannon Tanner <bannon@discourse.org> Co-authored-by: Bannon Tanner <bannon.n.tanner@gmail.com> Co-authored-by: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| asset-processor | ||
| deprecation-silencer | ||
| discourse | ||
| discourse-i18n | ||
| discourse-markdown-it | ||
| discourse-types | ||
| pretty-text | ||
| .npmrc | ||
| polyfills.js | ||