Merge pull request #4564 from dongjoon-hyun/rename_const_persist_prefix
Rename constant `PERSIST_PERFIX` to `PERSIST_PREFIX` in `session.js`.
This commit is contained in:
commit
361b9cad0f
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
const EventEmitter = require('events').EventEmitter;
|
||||
const bindings = process.atomBinding('session');
|
||||
const PERSIST_PERFIX = 'persist:';
|
||||
const PERSIST_PREFIX = 'persist:';
|
||||
|
||||
// Returns the Session from |partition| string.
|
||||
exports.fromPartition = function(partition) {
|
||||
|
@ -10,8 +10,8 @@ exports.fromPartition = function(partition) {
|
|||
if (partition === '') {
|
||||
return exports.defaultSession;
|
||||
}
|
||||
if (partition.startsWith(PERSIST_PERFIX)) {
|
||||
return bindings.fromPartition(partition.substr(PERSIST_PERFIX.length), false);
|
||||
if (partition.startsWith(PERSIST_PREFIX)) {
|
||||
return bindings.fromPartition(partition.substr(PERSIST_PREFIX.length), false);
|
||||
} else {
|
||||
return bindings.fromPartition(partition, true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue