diff --git a/AppScope/app.json5 b/AppScope/app.json5 index 72fbafcfb8a50609379cf3e36e53ad3bf951d9e6..2dcab9c694b0d513cd1f5f9b9c0f9634be47c134 100644 --- a/AppScope/app.json5 +++ b/AppScope/app.json5 @@ -3,7 +3,7 @@ "bundleName": "com.openharmony.xmlgraphicsbatik", "vendor": "example", "versionCode": 1000000, - "versionName": "2.1.1-rc.0", + "versionName": "2.1.1-rc.1", "icon": "$media:app_icon", "label": "$string:app_name", "distributedNotificationEnabled": true diff --git a/CHANGELOG.md b/CHANGELOG.md index 1185a8f4e0787fcf6db60a359de3cc82dd586e84..1b17e6ef39dc7c75b7d8d4171c5de6d5162534aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Version 2.1.1-rc.1 + +- 修改hasOwnProperty的使用问题 + ## Version 2.1.1-rc.0 - 修复不兼容API9问题 diff --git a/README.md b/README.md index 5a6d90bb4e7ece64944cbfd71602ce1c826e1297..25cc1a4798cd3901eaa8a8b9f1fb99f9142f4e98 100644 --- a/README.md +++ b/README.md @@ -316,6 +316,8 @@ this.svgManager.parse('svg.svg', (parseXMLResultObj) =>{ 在下述版本验证通过: +DevEco Studio: 4.0 (4.0.3.600), SDK: API10 (4.0.10.11) + DevEco Studio: 4.0 (4.0.3.512), SDK: API10 (4.0.10.9) DevEco Studio: 3.1 Beta2(3.1.0.400), SDK: API9 Release(3.2.11.9) diff --git a/XmlGraphicsBatik/oh-package.json5 b/XmlGraphicsBatik/oh-package.json5 index e03f36189cc54d807539f48bf19d40b32079a3cc..2be2e6aa434e6e7abbd53fba4ccf49db56632d2a 100644 --- a/XmlGraphicsBatik/oh-package.json5 +++ b/XmlGraphicsBatik/oh-package.json5 @@ -10,7 +10,7 @@ }, "main": "index.ets", "repository": "https://gitee.com/openharmony-tpc/XmlGraphicsBatik", - "version": "2.1.1-rc.0", + "version": "2.1.1-rc.1", "dependencies": {}, "tags": [ "Tool" diff --git a/XmlGraphicsBatik/src/main/ets/batik/tools/DeleteProperty.ts b/XmlGraphicsBatik/src/main/ets/batik/tools/DeleteProperty.ts index fb6e2a86261aa835b443fc0697154a183a6859d2..dd62086fea9c4b5f06ce75441241f82f7a71ca26 100644 --- a/XmlGraphicsBatik/src/main/ets/batik/tools/DeleteProperty.ts +++ b/XmlGraphicsBatik/src/main/ets/batik/tools/DeleteProperty.ts @@ -12,11 +12,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +export function hasOwn(obj,value){ + let result=false + for (let key in obj) { + if (key===value) { + result=true + } + } + return result +} export function deleteProperty(obj, propertyName) { - if (obj.hasOwnProperty(propertyName)) { + if (hasOwn(obj,propertyName)) { delete obj[propertyName]; - console.log(`Deleted property '${propertyName}' from the object.`); - } else { - console.log(`Property '${propertyName}' does not exist on the object.`); } } \ No newline at end of file diff --git a/XmlGraphicsBatik/src/main/ets/batik/tools/MakePropertiesImmutable.ts b/XmlGraphicsBatik/src/main/ets/batik/tools/MakePropertiesImmutable.ts index 7c4a13d15966878f35791e39dd38eb5a90611560..2fb8d13b32ff096713b190ed071a47fa707e632f 100644 --- a/XmlGraphicsBatik/src/main/ets/batik/tools/MakePropertiesImmutable.ts +++ b/XmlGraphicsBatik/src/main/ets/batik/tools/MakePropertiesImmutable.ts @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { hasOwn } from './DeleteProperty'; + export function makePropertiesImmutable(obj) { for (const key in obj) { - if (obj.hasOwnProperty(key)) { + if (hasOwn(obj,key)) { Object.defineProperty(obj, key, { writable: false }); } } diff --git a/entry/oh-package.json5 b/entry/oh-package.json5 index d3524c7ce2b05c6048c4202472fa71a8bc1faf8c..3eee22118636bab6eb22ef2a7f113546049878cb 100644 --- a/entry/oh-package.json5 +++ b/entry/oh-package.json5 @@ -4,7 +4,7 @@ "name": "entry", "description": "example description", "repository": {}, - "version": "2.1.1-rc.0", + "version": "2.1.1-rc.1", "dependencies": { "@ohos/XmlGraphicsBatik": "file:../XmlGraphicsBatik" } diff --git a/oh-package.json5 b/oh-package.json5 index e539fe34756a0d4bea5040fa99566bfddd2f28c1..b6ce35fdd5029647aa8ed960cbed53663204491f 100644 --- a/oh-package.json5 +++ b/oh-package.json5 @@ -6,7 +6,7 @@ "name": "xmlgraphicsbatik", "description": "example description", "repository": {}, - "version": "2.1.1-rc.0", + "version": "2.1.1-rc.1", "dependencies": { "@ohos/hypium": "1.0.6" }