mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-12 13:48:58 +02:00
fix: handle prototype property names in repository trees
This commit is contained in:
@@ -526,7 +526,7 @@ angular
|
||||
function ($element, $scope, $routeParams, $compile) {
|
||||
$scope.repoId = document.location.pathname.split("/")[2];
|
||||
|
||||
$scope.opens = {};
|
||||
$scope.opens = Object.create(null);
|
||||
|
||||
if ($routeParams.path) {
|
||||
let accumulatedPath = "";
|
||||
@@ -538,7 +538,8 @@ angular
|
||||
|
||||
const toArray = function (arr) {
|
||||
const output = [];
|
||||
const keys = { "": { child: output } };
|
||||
const keys = Object.create(null);
|
||||
keys[""] = { child: output };
|
||||
function ensurePath(path) {
|
||||
if (keys[path]) return;
|
||||
const segments = path.split("/");
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user