Skip to content

Commit 0cefbbb

Browse files
committed
fix $appendTo & $before target inDoc check
1 parent b6e1ba4 commit 0cefbbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/api/dom.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var transition = require('../transition')
1010
*/
1111

1212
exports.$appendTo = function (target, cb, withTransition) {
13+
target = query(target)
1314
var targetIsDetached = !_.inDoc(target)
1415
var op = withTransition === false || targetIsDetached
1516
? append
@@ -43,6 +44,7 @@ exports.$prependTo = function (target, cb, withTransition) {
4344
*/
4445

4546
exports.$before = function (target, cb, withTransition) {
47+
target = query(target)
4648
var targetIsDetached = !_.inDoc(target)
4749
var op = withTransition === false || targetIsDetached
4850
? before
@@ -112,7 +114,6 @@ exports.$remove = function (cb, withTransition) {
112114
*/
113115

114116
function insert (vm, target, op, targetIsDetached, cb) {
115-
target = query(target)
116117
var shouldCallHook =
117118
!targetIsDetached &&
118119
!vm._isAttached &&

0 commit comments

Comments
 (0)