Skip to content

Commit 4872304

Browse files
msaelicesrigor789
authored andcommitted
fix(frame): $refs inside default page (#544)
* fix: fix access this.$refs.foo if component is declared with ref="foo" * refactor: remove console.log from frame Fixes #543
1 parent fd9a1a3 commit 4872304

File tree

1 file changed

+2
-6
lines changed
  • platform/nativescript/runtime/components

1 file changed

+2
-6
lines changed

platform/nativescript/runtime/components/frame.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ export default {
3838
},
3939
data() {
4040
return {
41-
// isFirstRender: true,
4241
properties: {}
4342
}
4443
},
4544
created() {
46-
this._isFirstRender = true
4745
this.properties = Object.assign({}, this.$attrs, this.$props)
4846

4947
setFrame(this.properties.id, this)
@@ -54,8 +52,8 @@ export default {
5452
render(h) {
5553
let vnode = null
5654

57-
// Render slot on first render to ensure default page is displayed
58-
if (this.$slots.default && this._isFirstRender) {
55+
// Render slot to ensure default page is displayed
56+
if (this.$slots.default) {
5957
if (
6058
process.env.NODE_ENV !== 'production' &&
6159
this.$slots.default.length > 1
@@ -64,7 +62,6 @@ export default {
6462
`The <Frame> element can only have a single child element, that is the defaultPage.`
6563
)
6664
}
67-
this._isFirstRender = false
6865
vnode = this.$slots.default[0]
6966
vnode.key = 'default'
7067
}
@@ -109,7 +106,6 @@ export default {
109106
},
110107

111108
notifyPageMounted(pageVm) {
112-
console.log('Page Mounted.')
113109
let options = {
114110
backstackVisible: this.backstackVisible,
115111
clearHistory: this.clearHistory,

0 commit comments

Comments
 (0)