public parseHash()

in build-inspector/src/inspector/associatedItemsView.ts [221:239]


    public parseHash(hash: string): void {
        var result = {};
        
        // If hash exists, parse it
        if (hash && Object.keys(hash).length > 0) {
            // decode each parameter
            var queryStringParams = hash.split("&");
            queryStringParams.forEach(function (val) {
                var param = val.split('=');
                result[decodeURIComponent(param[0])] = decodeURIComponent(param[1]);
            });
        }

        this._currentAction = result["_a"] || "overview";
        if (this._currentAction !== "commit" && this._currentAction !== "workitem" && this._currentAction !== "overview") {
            this._currentAction = "overview";
        }
        this._currentId = result["id"] || this._currentAction;
    }