<!--
-Please make sure to read the Pull Request Guidelines:
-https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#Pull-Request
+Please make sure to include a test! If this is closing an
+existing issue, reference that issue as well.
-->
-
-<!-- PULL REQUEST TEMPLATE -->
-<!-- (Update "[ ]" to "[x]" to check a box) -->
-<!-- Tip: publish the PR and check the checkboxes by simply clicking on them -->
-
-**What kind of change does this PR introduce?** (check at least one)
-
-- [ ] Bugfix
-- [ ] Feature
-- [ ] Code style update
-- [ ] Refactor
-- [ ] Build-related changes
-- [ ] Other, please describe:
-
-**Does this PR introduce a breaking change?** (check one)
-
-- [ ] Yes
-- [ ] No
-
-If yes, please describe the impact and migration path for existing applications:
-
-**The PR fulfills these requirements:**
-
-- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
-- [ ] All tests are passing
-- [ ] New/updated tests are included
-
-If adding a **new feature**, the PR's description includes:
-
-- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)
-
-**Other information:**
$patch,
$reset,
$subscribe(callback, options = {}) {
+ /* istanbul ignore if */
if (__DEV__ && typeof options === 'boolean') {
console.warn(
`[🍍]: store.$subscribe() no longer accepts a boolean as the 2nd parameter:\n` +
`Replace "store.$subscribe(fn, ${String(
options
- )})" with "$store.$subscribe(fn, { detached: ${String(
+ )})" with "store.$subscribe(fn, { detached: ${String(
options
- )} })".`
+ )} })".\n This will fail in production.`
)
+ options = { detached: options }
}
const _removeSubscription = addSubscription(