()
| 131 | if (isVue2) { |
| 132 | app.mixin({ |
| 133 | beforeCreate() { |
| 134 | // HACK: taken from provide(): https://github.com/vuejs/composition-api/blob/master/src/apis/inject.ts#L30 |
| 135 | if (!this._provided) { |
| 136 | const provideCache = {} |
| 137 | Object.defineProperty(this, '_provided', { |
| 138 | get: () => provideCache, |
| 139 | set: (v) => Object.assign(provideCache, v), |
| 140 | }) |
| 141 | } |
| 142 | |
| 143 | this._provided[clientKey] = client |
| 144 | |
| 145 | if (process.env.NODE_ENV === 'development') { |
| 146 | if (this === this.$root && options.enableDevtoolsV6Plugin) { |
| 147 | setupDevtools(this, client) |
| 148 | } |
| 149 | } |
| 150 | }, |
| 151 | }) |
| 152 | } else { |
| 153 | app.provide(clientKey, client) |
nothing calls this directly
no test coverage detected