Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

Fixed error when there was no label set in config #7

Merged
merged 1 commit into from
May 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
throw "ERROR: 'base' value required to generate 'Edit This Page' link. \nFor help, please refer to - https://github.com/rtCamp/gitbook-plugin-edit-link/blob/master/README.md#usage";
}

var label = config.label[this.context.config.language] || config.label || "Edit This Page";
var label = (config.label && config.label[this.context.config.language]) || config.label || "Edit This Page";

// add slash at the end if not present
var base = config.base;
Expand Down