Skip to content

Commit fca74b0

Browse files
authored
fix(runtime-vapor): remove access globalProperties warning (#13609)
1 parent b9fb79a commit fca74b0

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ describe('api: createVaporApp', () => {
341341
})
342342
})
343343

344-
test('config.globalProperty', () => {
344+
test.todo('config.globalProperty', () => {
345345
const { app } = define({
346346
setup() {
347347
return []
@@ -351,7 +351,7 @@ describe('api: createVaporApp', () => {
351351
app.config.globalProperties.msg = 'hello world'
352352
} catch (e) {}
353353
expect(
354-
`app.config.globalProperties is not supported in vapor mode`,
354+
`app.config.globalProperties is not supported in vapor mode components`,
355355
).toHaveBeenWarned()
356356
})
357357
})

packages/runtime-vapor/src/apiCreateApp.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,6 @@ function prepareApp() {
8888
}
8989

9090
function postPrepareApp(app: App) {
91-
if (__DEV__) {
92-
app.config.globalProperties = new Proxy(
93-
{},
94-
{
95-
set() {
96-
warn(`app.config.globalProperties is not supported in vapor mode.`)
97-
return false
98-
},
99-
},
100-
)
101-
}
102-
10391
app.vapor = true
10492
const mount = app.mount
10593
app.mount = (container, ...args: any[]) => {

0 commit comments

Comments
 (0)