Skip to content

Commit

Permalink
Merge pull request #263 from hjdhnx/main
Browse files Browse the repository at this point in the history
修复for in的Bug
  • Loading branch information
Hiram-Wong authored Jun 23, 2024
2 parents 5ca33f9 + 41bc8a5 commit 856ccf5
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/main/core/server/routes/lab/ad/core.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import axios from 'axios';
import logger from '../../../../logger';

if (typeof Array.prototype.toReversed !== 'function') {
Array.prototype.toReversed = function () {
const clonedList = this.slice();
// 倒序新数组
const reversedList = clonedList.reverse();
return reversedList;
};
if (typeof Array.prototype.toReversed != 'function') {
Object.defineProperty(Array.prototype, 'toReversed', {
value: function () {
const clonedList = this.slice();
// 倒序新数组
const reversedList = clonedList.reverse();
return reversedList;
},
enumerable: false
});
}

const resolve = (from, to) => {
Expand Down

0 comments on commit 856ccf5

Please sign in to comment.