feat(replace): clone properties when morphing to new element
Closes #647
This commit is contained in:
parent
dc78c86551
commit
af9a36b9b6
|
@ -6,6 +6,18 @@ var forEach = require('lodash/collection/forEach'),
|
||||||
contains = require('lodash/collection/contains');
|
contains = require('lodash/collection/contains');
|
||||||
|
|
||||||
|
|
||||||
|
function isAllowedIn(extProp, type) {
|
||||||
|
var allowedIn = extProp.meta.allowedIn;
|
||||||
|
|
||||||
|
// '*' is a wildcard, which means any element is allowed to use this property
|
||||||
|
if (allowedIn.length === 1 && allowedIn[0] === '*') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return allowedIn.indexOf(type) !== -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function isAllowedIn(extProp, type) {
|
function isAllowedIn(extProp, type) {
|
||||||
var allowedIn = extProp.meta.allowedIn;
|
var allowedIn = extProp.meta.allowedIn;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue