Skip to content

Commit

Permalink
fix(vue): fix rootview conditional statement (#3355)
Browse files Browse the repository at this point in the history
* fix(vue): fix rootview conditional statement

* fix(test): fix js build test

* fix(test): fix js build test

* fix(test): fix js build test
  • Loading branch information
zealotchen0 authored Jul 5, 2023
1 parent ee3deeb commit a156a22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/frontend_build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
cache: 'npm'
cache-dependency-path: driver/js/package-lock.json
- name: install
run: npm ci && lerna bootstrap --no-ci
run: |
npm install && npx lerna bootstrap --no-ci
- name: lint & build
run: npm run lint & npm run build
- name: test
Expand Down
7 changes: 0 additions & 7 deletions driver/js/packages/hippy-vue/src/runtime/node-ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import document from '../renderer/document-node';
import { unCacheNodeOnIdle } from '../util/node';
import { getApp } from '../util';
import { setAttrs } from './modules/attrs';
import { setStyle } from './modules/style';
import { setClass } from './modules/class';
Expand All @@ -34,12 +33,6 @@ function setRootViewAttr(elm, vnode) {
let isRootView = false;
if (elm.nodeId === ROOT_VIEW_ID) {
isRootView = true;
} else if (vnode && vnode.data && vnode.data.attrs && vnode.data.attrs.id) {
const app = getApp();
if (app) {
const { $options: { rootView } } = app;
isRootView = vnode.data.attrs.id === rootView.slice(1 - rootView.length);
}
}
if (isRootView) {
setAttrs(vnode, elm, { notToNative: true });
Expand Down

0 comments on commit a156a22

Please sign in to comment.